From d23dabbc395a4bc3feb284318750dedaa20da1b7 Mon Sep 17 00:00:00 2001 From: Anant Prakash Date: Thu, 26 Jul 2018 21:54:20 +0530 Subject: [PATCH] Add Unsorted in the function name --- src/github.com/matrix-org/dendrite/common/test/slice.go | 4 ++-- .../matrix-org/dendrite/roomserver/query/query_test.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) 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) } }