lib: Use bytes.Equal instead of bytes.Compare where possible
This commit is contained in:
committed by
Audrius Butkevicius
parent
b6f32b6e45
commit
f5f0e46016
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user