MCPcopy Create free account
hub / github.com/allegro/bigcache / TestConstructCacheWithDefaultHasher

Function TestConstructCacheWithDefaultHasher

bigcache_test.go:178–191  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

176}
177
178func TestConstructCacheWithDefaultHasher(t *testing.T) {
179 t.Parallel()
180
181 // given
182 cache, _ := New(context.Background(), Config{
183 Shards: 16,
184 LifeWindow: 5 * time.Second,
185 MaxEntriesInWindow: 10,
186 MaxEntrySize: 256,
187 })
188
189 _, ok := cache.hash.(fnv64a)
190 assertEqual(t, true, ok)
191}
192
193func TestNewBigcacheValidation(t *testing.T) {
194 t.Parallel()

Callers

nothing calls this directly

Calls 2

NewFunction · 0.85
assertEqualFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…