import from unified repo

This commit is contained in:
2021-10-03 16:24:20 +02:00
commit 79d1df4cf3
50 changed files with 21269 additions and 0 deletions

29
csgo/sharecode_test.go Normal file
View File

@@ -0,0 +1,29 @@
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()
}
}