]> Cypherpunks repositories - gostls13.git/commitdiff
sort: fix typo in sort_test.go
authorAlex Driuk <driukalex@google.com>
Wed, 6 Mar 2024 14:56:14 +0000 (15:56 +0100)
committerGopher Robot <gobot@golang.org>
Thu, 7 Mar 2024 19:41:04 +0000 (19:41 +0000)
Change-Id: Ibc1344b678d5f7c730b924c697717305c90c26e9
Reviewed-on: https://go-review.googlesource.com/c/go/+/569537
Commit-Queue: Ian Lance Taylor <iant@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/sort/sort_test.go

index ba757a845aaed42a4ffb3c9ca2a9902f793a15e3..ba0f0c52249f97349790441d1327a999d5a478f1 100644 (file)
@@ -50,7 +50,7 @@ func TestSortFloat64sCompareSlicesSort(t *testing.T) {
        slices.Sort(slice2)
 
        // Compare for equality using cmp.Compare, which considers NaNs equal.
-       if !slices.EqualFunc(slice1, slice1, func(a, b float64) bool { return cmp.Compare(a, b) == 0 }) {
+       if !slices.EqualFunc(slice1, slice2, func(a, b float64) bool { return cmp.Compare(a, b) == 0 }) {
                t.Errorf("mismatch between Sort and slices.Sort: got %v, want %v", slice1, slice2)
        }
 }