(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func TestNewLRUExpireCache2(t *testing.T) { |
| 25 | contractLookupCache := NewLRUExpireCache(3) |
| 26 | forceLiveLookupTTL := 1 * time.Second |
| 27 | contractLookupCache.Add("key1", true, forceLiveLookupTTL) |
| 28 | contractLookupCache.Add("key2", true, forceLiveLookupTTL) |
| 29 | contractLookupCache.Add("key3", true, forceLiveLookupTTL) |
| 30 | contractLookupCache.Add("key4", true, forceLiveLookupTTL) |
| 31 | v1, gotIt := contractLookupCache.Get("key1") |
| 32 | assert.False(t, gotIt) |
| 33 | assert.Nil(t, v1) |
| 34 | assert.Equal(t, 3, len(contractLookupCache.Keys())) |
| 35 | } |
nothing calls this directly
no test coverage detected