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

Function TestLen

queue/bytes_queue_test.go:32–45  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30}
31
32func TestLen(t *testing.T) {
33 t.Parallel()
34
35 // given
36 queue := NewBytesQueue(100, 0, false)
37 entry := []byte("hello")
38 assertEqual(t, 0, queue.Len())
39
40 // when
41 queue.Push(entry)
42
43 // then
44 assertEqual(t, queue.Len(), 1)
45}
46
47func TestPeek(t *testing.T) {
48 t.Parallel()

Callers

nothing calls this directly

Calls 4

LenMethod · 0.95
PushMethod · 0.95
NewBytesQueueFunction · 0.85
assertEqualFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…