mirror of
https://github.com/jech/galene.git
synced 2024-11-25 10:05:58 +01:00
Use bytes.Equal in packetcache_test.go.
This commit is contained in:
parent
b7a680671d
commit
e373054f7e
1 changed files with 4 additions and 4 deletions
|
@ -26,20 +26,20 @@ func TestCache(t *testing.T) {
|
||||||
buf := make([]byte, BufSize)
|
buf := make([]byte, BufSize)
|
||||||
|
|
||||||
l := cache.Get(13, buf)
|
l := cache.Get(13, buf)
|
||||||
if bytes.Compare(buf[:l], buf1) != 0 {
|
if !bytes.Equal(buf[:l], buf1) {
|
||||||
t.Errorf("Couldn't get 13")
|
t.Errorf("Couldn't get 13")
|
||||||
}
|
}
|
||||||
l = cache.GetAt(13, i1, buf)
|
l = cache.GetAt(13, i1, buf)
|
||||||
if bytes.Compare(buf[:l], buf1) != 0 {
|
if !bytes.Equal(buf[:l], buf1) {
|
||||||
t.Errorf("Couldn't get 13 at %v", i1)
|
t.Errorf("Couldn't get 13 at %v", i1)
|
||||||
}
|
}
|
||||||
|
|
||||||
l = cache.Get(17, buf)
|
l = cache.Get(17, buf)
|
||||||
if bytes.Compare(buf[:l], buf2) != 0 {
|
if !bytes.Equal(buf[:l], buf2) {
|
||||||
t.Errorf("Couldn't get 17")
|
t.Errorf("Couldn't get 17")
|
||||||
}
|
}
|
||||||
l = cache.GetAt(17, i2, buf)
|
l = cache.GetAt(17, i2, buf)
|
||||||
if bytes.Compare(buf[:l], buf2) != 0 {
|
if !bytes.Equal(buf[:l], buf2) {
|
||||||
t.Errorf("Couldn't get 17 at %v", i2)
|
t.Errorf("Couldn't get 17 at %v", i2)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue