From 146ef8462ac8f5f7424e1db4d779ea286aaf6822 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Thu, 24 Jul 2025 17:32:11 -0400 Subject: make PoC Decklist test deterministic --- go/game/pileOfCards_test.go | 8 +++++--- 1 file 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) } } -- cgit v1.2.3