(t *testing.T, cache *BufferCache, key string)
| 91 | } |
| 92 | |
| 93 | func assertKeyNotInHotCache(t *testing.T, cache *BufferCache, key string) { |
| 94 | t.Helper() |
| 95 | |
| 96 | loc, ok := cache.m.m[key] |
| 97 | if ok && loc.isHot() { |
| 98 | t.Errorf(`got key "%s" in hot cache, got loc=%s`, key, loc) |
| 99 | } |
| 100 | if _, ok := cache.hot.m[key]; ok { |
| 101 | t.Errorf(`key "%s" found in hot cache`, key) |
| 102 | } |
| 103 | } |
| 104 | |
| 105 | func assertKeyInColdCache(t *testing.T, cache *BufferCache, key string) { |
| 106 | t.Helper() |
no test coverage detected