Skip to content

Commit

Permalink
cmd/link: replace bytes.Compare call with bytes.Equal
Browse files Browse the repository at this point in the history
Change-Id: Icc254cad3c861fd2b33228aa4d19424ce57a1b55
GitHub-Last-Rev: f557a69
GitHub-Pull-Request: #66153
Reviewed-on: https://go-review.googlesource.com/c/go/+/569695
Reviewed-by: Ian Lance Taylor <[email protected]>
Auto-Submit: Ian Lance Taylor <[email protected]>
Reviewed-by: Mauri de Souza Meneguzzo <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
LUCI-TryBot-Result: Go LUCI <[email protected]>
  • Loading branch information
testwill authored and gopherbot committed Mar 7, 2024
1 parent 47079b5 commit e0ba596
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cmd/link/internal/loader/loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down Expand Up @@ -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))
}
Expand Down

0 comments on commit e0ba596

Please sign in to comment.