From f618b3703093058943df2fa9d481525011b7209d Mon Sep 17 00:00:00 2001 From: Dalton Williams Date: Wed, 14 Aug 2024 19:27:25 -0500 Subject: [PATCH] Slight rework to slice test to make it consistently pass --- aocutils/strings_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/aocutils/strings_test.go b/aocutils/strings_test.go index be949e7..ad1683f 100644 --- a/aocutils/strings_test.go +++ b/aocutils/strings_test.go @@ -2,6 +2,7 @@ package aocutils import ( "reflect" + "slices" "testing" ) @@ -75,6 +76,8 @@ func TestFindSubstringsOfLength(t *testing.T) { for _, test := range tests { result := FindSubstringsOfLength(test.input, test.length) + slices.Sort(result) + slices.Sort(test.expected) if !reflect.DeepEqual(result, test.expected) { t.Errorf("FindSubstringsOfLength(%q, %d) = %v; expected %v", test.input, test.length, result, test.expected) }