mirror of
https://github.com/nadoo/glider.git
synced 2025-04-21 19:52:07 +08:00
chore: bytes.Equal instead bytes.Compare
This commit is contained in:
parent
4f12a4f308
commit
3b08d7b8a2
@ -208,7 +208,7 @@ func TestWriteTo(t *testing.T) {
|
|||||||
t.Fatal("WriteTo nw mismatch", nw)
|
t.Fatal("WriteTo nw mismatch", nw)
|
||||||
}
|
}
|
||||||
|
|
||||||
if bytes.Compare(sndbuf, rcvbuf.Bytes()) != 0 {
|
if !bytes.Equal(sndbuf, rcvbuf.Bytes()) {
|
||||||
t.Fatal("mismatched echo bytes")
|
t.Fatal("mismatched echo bytes")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -282,7 +282,7 @@ func TestWriteToV2(t *testing.T) {
|
|||||||
t.Fatal("WriteTo nw mismatch", nw)
|
t.Fatal("WriteTo nw mismatch", nw)
|
||||||
}
|
}
|
||||||
|
|
||||||
if bytes.Compare(sndbuf, rcvbuf.Bytes()) != 0 {
|
if !bytes.Equal(sndbuf, rcvbuf.Bytes()) {
|
||||||
t.Fatal("mismatched echo bytes")
|
t.Fatal("mismatched echo bytes")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user