mirror of
https://github.com/Icinga/icingadb.git
synced 2026-05-28 04:35:54 -04:00
Use !bytes.Equal(x,y), not bytes.Compare(x,y)!=0
This commit is contained in:
parent
a4abdce1f0
commit
1329c68cf3
1 changed files with 2 additions and 2 deletions
|
|
@ -158,8 +158,8 @@ func assertPackAny(t *testing.T, in interface{}, out []byte) {
|
|||
{
|
||||
buf := &bytes.Buffer{}
|
||||
if err := PackAny(in, buf); err == nil {
|
||||
if bytes.Compare(buf.Bytes(), out) != 0 {
|
||||
t.Errorf("buf := &bytes.Buffer{}; packAny(%#v, buf); bytes.Compare(buf.Bytes(), %#v) != 0", in, out)
|
||||
if !bytes.Equal(buf.Bytes(), out) {
|
||||
t.Errorf("buf := &bytes.Buffer{}; packAny(%#v, buf); !bytes.Equal(buf.Bytes(), %#v)", in, out)
|
||||
}
|
||||
} else {
|
||||
t.Errorf("packAny(%#v, &bytes.Buffer{}) != nil", in)
|
||||
|
|
|
|||
Loading…
Reference in a new issue