diff options
| author | apocelipes <seve3r@outlook.com> | 2024-07-24 10:39:58 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-07-25 00:22:14 +0000 |
| commit | 2247afc0aee41434a4e874af07d026f828bd3210 (patch) | |
| tree | 939cfa7ec182e2c0fb80c1125841ee54c50e48a9 /src/internal/godebug | |
| parent | 1d717951f518a9e818e8b98d4daed17756c394ca (diff) | |
| download | go-2247afc0aee41434a4e874af07d026f828bd3210.tar.xz | |
go,internal,io,mime: use slices and maps to clean tests
Replace reflect.DeepEqual with slices.Equal/maps.Equal, which is
much faster.
Change-Id: Id9cb550884da817da96befdeccfecb3325fb4414
GitHub-Last-Rev: 7d64d78feb86e3ea1af6c24ea6782cb85731bb52
GitHub-Pull-Request: golang/go#67612
Reviewed-on: https://go-review.googlesource.com/c/go/+/587819
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Diffstat (limited to 'src/internal/godebug')
| -rw-r--r-- | src/internal/godebug/godebug_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/internal/godebug/godebug_test.go b/src/internal/godebug/godebug_test.go index 5d426fd52e..6929630356 100644 --- a/src/internal/godebug/godebug_test.go +++ b/src/internal/godebug/godebug_test.go @@ -11,7 +11,6 @@ import ( "internal/testenv" "os" "os/exec" - "reflect" "runtime/metrics" "slices" "strings" @@ -125,7 +124,7 @@ func TestCmdBisect(t *testing.T) { } slices.Sort(have) - if !reflect.DeepEqual(have, want) { + if !slices.Equal(have, want) { t.Errorf("bad bisect output:\nhave %v\nwant %v\ncomplete output:\n%s", have, want, string(out)) } } |
