lib: Use bytes.Equal instead of bytes.Compare where possible

This commit is contained in:
Jakob Borg authored and Audrius Butkevicius committed 2016-03-31 15:12:46 +00:00
1 parent b6f32b6e45
commit f5f0e46016
8 files changed
+21 -21

No files matched your search

+2 -2
View File
@@ -497,10 +497,10 @@ func TestCopy(t *testing.T) {
t.Fatal(err)
}
if bytes.Compare(bsOrig, bsChanged) == 0 {
if bytes.Equal(bsOrig, bsChanged) {
t.Error("Config should have changed")
}
if bytes.Compare(bsOrig, bsCopy) != 0 {
if !bytes.Equal(bsOrig, bsCopy) {
//ioutil.WriteFile("a", bsOrig, 0644)
//ioutil.WriteFile("b", bsCopy, 0644)
t.Error("Copy should be unchanged")