aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/json/decode_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/encoding/json/decode_test.go')
-rw-r--r--src/encoding/json/decode_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/encoding/json/decode_test.go b/src/encoding/json/decode_test.go
index a10c1e1ebb..f5b44677b3 100644
--- a/src/encoding/json/decode_test.go
+++ b/src/encoding/json/decode_test.go
@@ -14,6 +14,7 @@ import (
"math/big"
"net"
"reflect"
+ "slices"
"strconv"
"strings"
"testing"
@@ -1998,7 +1999,7 @@ func TestByteKind(t *testing.T) {
if err != nil {
t.Fatalf("Unmarshal error: %v", err)
}
- if !reflect.DeepEqual(got, want) {
+ if !slices.Equal(got, want) {
t.Fatalf("Marshal/Unmarshal mismatch:\n\tgot: %v\n\twant: %v", got, want)
}
}
@@ -2017,7 +2018,7 @@ func TestSliceOfCustomByte(t *testing.T) {
if err != nil {
t.Fatalf("Unmarshal error: %v", err)
}
- if !reflect.DeepEqual(got, want) {
+ if !slices.Equal(got, want) {
t.Fatalf("Marshal/Unmarshal mismatch:\n\tgot: %v\n\twant: %v", got, want)
}
}