Improve cache testing a bit more
This commit is contained in:
parent
e56c4835f1
commit
d404651a74
|
@ -25,6 +25,13 @@ func TestCache(t *testing.T) {
|
|||
if len(result) != expected {
|
||||
t.Errorf("invalid read len %d != %d\n", len(result), expected)
|
||||
}
|
||||
if expected < 0 {
|
||||
for k, v := range result {
|
||||
if v.Time != uint64(k+j) {
|
||||
t.Errorf("incorrect time %d != %d\n", v.Time, j+k)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if result != nil {
|
||||
|
|
Loading…
Reference in New Issue