diff options
| author | Florian Fischer <florian.fischer@muhq.space> | 2025-07-24 17:32:11 -0400 |
|---|---|---|
| committer | Florian Fischer <florian.fischer@muhq.space> | 2025-07-28 18:03:10 +0200 |
| commit | 50e861f2d500a230b874b0ecf0af846f78658cb1 (patch) | |
| tree | a4f9730d61480668504dabf286a043a0cdbbd74c | |
| parent | 32410744074b3d4bc9d537ef50a3fdfeb92cfdc8 (diff) | |
| download | muhqs-game-50e861f2d500a230b874b0ecf0af846f78658cb1.tar.gz muhqs-game-50e861f2d500a230b874b0ecf0af846f78658cb1.zip | |
make PoC Decklist test deterministic
| -rw-r--r-- | go/game/pileOfCards_test.go | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/go/game/pileOfCards_test.go b/go/game/pileOfCards_test.go index 75467b57..f1927b8c 100644 --- a/go/game/pileOfCards_test.go +++ b/go/game/pileOfCards_test.go @@ -3,6 +3,8 @@ package game import ( "errors" "testing" + + "golang.org/x/exp/slices" ) func TestPocToString(t *testing.T) { @@ -98,9 +100,9 @@ func TestPocToList(t *testing.T) { t.Fatal("poc size != 3:", poc.Size()) } is := poc.ToList() - exp := "2 base/archer\n1 base/knight" - if is != exp { - t.Fatal("is != exp:", is, exp) + exp := []string{"2 base/archer\n1 base/knight", "1 base/knight\n2 base/archer"} + if !slices.Contains(exp, is) { + t.Fatal("not expected cardList:", is) } } |
