Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2673)

Unified Diff: src/cmd/gofmt/long_test.go

Issue 7038051: code review 7038051: src: Use bytes.Equal instead of bytes.Compare where pos... (Closed)
Patch Set: diff -r be6ca9f6bfe8 https://code.google.com/p/go Created 12 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/cmd/gofmt/gofmt_test.go ('k') | src/pkg/bufio/bufio_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/cmd/gofmt/long_test.go
===================================================================
--- a/src/cmd/gofmt/long_test.go
+++ b/src/cmd/gofmt/long_test.go
@@ -84,7 +84,7 @@
}
// the first and 2nd result should be identical
- if bytes.Compare(b1.Bytes(), b2.Bytes()) != 0 {
+ if !bytes.Equal(b1.Bytes(), b2.Bytes()) {
t.Errorf("gofmt %s not idempotent", filename)
}
}
« no previous file with comments | « src/cmd/gofmt/gofmt_test.go ('k') | src/pkg/bufio/bufio_test.go » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b