aboutsummaryrefslogtreecommitdiff
path: root/src/strings
diff options
context:
space:
mode:
Diffstat (limited to 'src/strings')
-rw-r--r--src/strings/search_test.go4
-rw-r--r--src/strings/strings_test.go6
2 files changed, 5 insertions, 5 deletions
diff --git a/src/strings/search_test.go b/src/strings/search_test.go
index c01a393a12..034085043a 100644
--- a/src/strings/search_test.go
+++ b/src/strings/search_test.go
@@ -5,7 +5,7 @@
package strings_test
import (
- "reflect"
+ "slices"
. "strings"
"testing"
)
@@ -83,7 +83,7 @@ func TestFinderCreation(t *testing.T) {
}
}
- if !reflect.DeepEqual(good, tc.suf) {
+ if !slices.Equal(good, tc.suf) {
t.Errorf("boyerMoore(%q) got %v want %v", tc.pattern, good, tc.suf)
}
}
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)
}
}