From d404651a74b305e0917eecd413d0566479e87fa3 Mon Sep 17 00:00:00 2001 From: Kelvin Ly Date: Mon, 3 Jul 2023 05:16:23 -0400 Subject: [PATCH] Improve cache testing a bit more --- shroom_internals/cache_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/shroom_internals/cache_test.go b/shroom_internals/cache_test.go index b8e51fc..08165ad 100644 --- a/shroom_internals/cache_test.go +++ b/shroom_internals/cache_test.go @@ -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 {