]> Cypherpunks repositories - gostls13.git/commitdiff
cmd/compile/internal/syntax: replace bytes.Compare call with bytes.Equal
authorguoguangwu <guoguangwug@gmail.com>
Thu, 14 Mar 2024 03:16:12 +0000 (03:16 +0000)
committerGopher Robot <gobot@golang.org>
Thu, 14 Mar 2024 16:30:19 +0000 (16:30 +0000)
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 <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Reviewed-by: Ian Lance Taylor <iant@google.com>
src/cmd/compile/internal/syntax/parser_test.go

index 538278b3eb89498150aa23c9491642cf4baaeb5e..b6c4b8fd5693d165f882f091177fadb26ac24e0c 100644 (file)
@@ -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()