diff options
| author | guoguangwu <guoguangwug@gmail.com> | 2024-03-07 01:57:07 +0000 |
|---|---|---|
| committer | Gopher Robot <gobot@golang.org> | 2024-03-07 19:08:09 +0000 |
| commit | e0ba596c15dd82aad021c0c812fda6ca14ce118a (patch) | |
| tree | 0f2cc2fca9da95eb8de715ec2e9422b9320f7654 /src/cmd/link/internal/loader/loader_test.go | |
| parent | 47079b5e80ed4aa2cc1b21a72a524f2f6c349e3f (diff) | |
| download | go-e0ba596c15dd82aad021c0c812fda6ca14ce118a.tar.xz | |
cmd/link: replace bytes.Compare call with bytes.Equal
Change-Id: Icc254cad3c861fd2b33228aa4d19424ce57a1b55
GitHub-Last-Rev: f557a696e4a5c632c49c7cd20745eeb771708f81
GitHub-Pull-Request: golang/go#66153
Reviewed-on: https://go-review.googlesource.com/c/go/+/569695
Reviewed-by: Ian Lance Taylor <iant@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
Reviewed-by: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/cmd/link/internal/loader/loader_test.go')
| -rw-r--r-- | src/cmd/link/internal/loader/loader_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cmd/link/internal/loader/loader_test.go b/src/cmd/link/internal/loader/loader_test.go index 32ff2586ce..eedcc9876b 100644 --- a/src/cmd/link/internal/loader/loader_test.go +++ b/src/cmd/link/internal/loader/loader_test.go @@ -192,7 +192,7 @@ func TestAddMaterializedSymbol(t *testing.T) { // ... then data. dat := sb2.Data() - if bytes.Compare(dat, d2) != 0 { + if !bytes.Equal(dat, d2) { t.Errorf("expected es2 data %v, got %v", d2, dat) } @@ -362,7 +362,7 @@ func TestAddDataMethods(t *testing.T) { t.Errorf("testing Loader.%s: expected kind %s got %s", tp.which, tp.expKind, ldr.SymType(mi)) } - if bytes.Compare(ldr.Data(mi), tp.expData) != 0 { + if !bytes.Equal(ldr.Data(mi), tp.expData) { t.Errorf("testing Loader.%s: expected data %v got %v", tp.which, tp.expData, ldr.Data(mi)) } |
