steamid.v/steamid_tests.v
2022-08-29 00:10:36 +02:00

11 lines
396 B
V

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 }
}