From 90a2dcf1dbc0c3ed46a76547c3c9578a73aeb822 Mon Sep 17 00:00:00 2001 From: guoguangwu Date: Thu, 14 Mar 2024 03:16:12 +0000 Subject: [PATCH] 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 --- src/cmd/compile/internal/syntax/parser_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() -- 2.48.1