diff --git a/src/github.com/matrix-org/dendrite/common/test/slice.go b/src/github.com/matrix-org/dendrite/common/test/slice.go index 52d1bb01b..00c740db7 100644 --- a/src/github.com/matrix-org/dendrite/common/test/slice.go +++ b/src/github.com/matrix-org/dendrite/common/test/slice.go @@ -14,9 +14,9 @@ package test import "sort" -// StringSliceEqual returns true if the slices have same length & elements. +// UnsortedStringSliceEqual returns true if the slices have same length & elements. // Does not modify the given slice. -func StringSliceEqual(first, second []string) bool { +func UnsortedStringSliceEqual(first, second []string) bool { if len(first) != len(second) { return false } diff --git a/src/github.com/matrix-org/dendrite/roomserver/query/query_test.go b/src/github.com/matrix-org/dendrite/roomserver/query/query_test.go index b01e00e0e..76c2e158f 100644 --- a/src/github.com/matrix-org/dendrite/roomserver/query/query_test.go +++ b/src/github.com/matrix-org/dendrite/roomserver/query/query_test.go @@ -116,7 +116,7 @@ func TestGetAuthChainSingle(t *testing.T) { expectedIDs := []string{"a", "b", "c", "d", "e"} - if !test.StringSliceEqual(expectedIDs, returnedIDs) { + if !test.UnsortedStringSliceEqual(expectedIDs, returnedIDs) { t.Fatalf("returnedIDs got '%v', expected '%v'", returnedIDs, expectedIDs) } } @@ -149,7 +149,7 @@ func TestGetAuthChainMultiple(t *testing.T) { expectedIDs := []string{"a", "b", "c", "d", "e", "f"} - if !test.StringSliceEqual(expectedIDs, returnedIDs) { + if !test.UnsortedStringSliceEqual(expectedIDs, returnedIDs) { t.Fatalf("returnedIDs got '%v', expected '%v'", returnedIDs, expectedIDs) } }