diff options
Diffstat (limited to 'src/strings/strings_test.go')
| -rw-r--r-- | src/strings/strings_test.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/strings/strings_test.go b/src/strings/strings_test.go index 4bd3a3c202..4c8c25ee13 100644 --- a/src/strings/strings_test.go +++ b/src/strings/strings_test.go @@ -10,7 +10,7 @@ import ( "io" "math" "math/rand" - "reflect" + "slices" "strconv" . "strings" "testing" @@ -431,7 +431,7 @@ func TestSplit(t *testing.T) { } if tt.n < 0 { b := Split(tt.s, tt.sep) - if !reflect.DeepEqual(a, b) { + if !slices.Equal(a, b) { t.Errorf("Split disagrees with SplitN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } @@ -467,7 +467,7 @@ func TestSplitAfter(t *testing.T) { } if tt.n < 0 { b := SplitAfter(tt.s, tt.sep) - if !reflect.DeepEqual(a, b) { + if !slices.Equal(a, b) { t.Errorf("SplitAfter disagrees with SplitAfterN(%q, %q, %d) = %v; want %v", tt.s, tt.sep, tt.n, b, a) } } |
