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

Unified Diff: src/pkg/encoding/hex/hex_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 11 years, 2 months 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/pkg/encoding/asn1/marshal_test.go ('k') | src/pkg/encoding/json/decode_test.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pkg/encoding/hex/hex_test.go
===================================================================
--- a/src/pkg/encoding/hex/hex_test.go
+++ b/src/pkg/encoding/hex/hex_test.go
@@ -65,7 +65,7 @@
t.Errorf("#%d: unexpected err value: %s", i, err)
continue
}
- if bytes.Compare(dst, test.dec) != 0 {
+ if !bytes.Equal(dst, test.dec) {
t.Errorf("#%d: got: %#v want: #%v", i, dst, test.dec)
}
}
« no previous file with comments | « src/pkg/encoding/asn1/marshal_test.go ('k') | src/pkg/encoding/json/decode_test.go » ('j') | no next file with comments »

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