From: guoguangwu Date: Thu, 14 Mar 2024 03:16:12 +0000 (+0000) Subject: cmd/compile/internal/syntax: replace bytes.Compare call with bytes.Equal X-Git-Tag: go1.23rc1~891 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=90a2dcf1dbc0c3ed46a76547c3c9578a73aeb822;p=gostls13.git cmd/compile/internal/syntax: replace bytes.Compare call with bytes.Equal Change-Id: I783e02e215efaebf4936146c6aaa032634fdfa64 GitHub-Last-Rev: 24680a73ee22fe03d7e33c122c95ed1372a2b406 GitHub-Pull-Request: golang/go#66304 Reviewed-on: https://go-review.googlesource.com/c/go/+/571595 Auto-Submit: Ian Lance Taylor Reviewed-by: Cherry Mui LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor --- diff --git a/src/cmd/compile/internal/syntax/parser_test.go b/src/cmd/compile/internal/syntax/parser_test.go index 538278b3eb..b6c4b8fd56 100644 --- a/src/cmd/compile/internal/syntax/parser_test.go +++ b/src/cmd/compile/internal/syntax/parser_test.go @@ -186,7 +186,7 @@ func verifyPrint(t *testing.T, filename string, ast1 *File) { } bytes2 := buf2.Bytes() - if bytes.Compare(bytes1, bytes2) != 0 { + if !bytes.Equal(bytes1, bytes2) { fmt.Printf("--- %s ---\n", filename) fmt.Printf("%s\n", bytes1) fmt.Println()