steamid.v/steamid_tests.v

12 lines
396 B
Coq
Raw Normal View History

2022-08-29 00:10:36 +02:00
import steamid as s
fn test_convert() {
assert s.to_steamid32("STEAM_0:1:37792218") == s.SteamID32 { 0, 1, 37792218 }
}
fn test_steamid32() {
assert s.SteamID32{ 0, 1, 37792218 }.str() == "STEAM_0:1:37792218"
assert s.SteamID32{ 0, 1, 37792218 }.to_steamid3() == s.SteamID3 { "U", 1, 75584437 }
assert s.SteamID32{ 0, 1, 37792218 }.to_steamid64() == s.SteamID64 { 76561198035850165 }
}