package csgo import "testing" //goland:noinspection SpellCheckingInspection func TestSharecode(t *testing.T) { eMatchId := uint64(3505575050994516382) eOutcomeId := uint64(3505581094013501947) eTokenId := uint32(12909) matchId, outcomeId, tokenId, err := DecodeSharecode("CSGO-P9k3F-eVL9n-LZLXN-DrBGF-VKD7K") if err != nil { t.Log("error should be nil", err) t.Fail() } if matchId != eMatchId { t.Logf("matchID should be %d, is %d", eMatchId, matchId) t.Fail() } if outcomeId != eOutcomeId { t.Logf("outcomeID should be %d, is %d", eOutcomeId, outcomeId) t.Fail() } if tokenId != eTokenId { t.Logf("tokenID should be %d, is %d", eTokenId, tokenId) t.Fail() } }