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

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

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")