MCPcopy
hub / github.com/panjf2000/ants / TestNewLoopQueue

Function TestNewLoopQueue

worker_loop_queue_test.go:32–40  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

30)
31
32func TestNewLoopQueue(t *testing.T) {
33 size := 100
34 q := newWorkerLoopQueue(size)
35 require.EqualValues(t, 0, q.len(), "Len error")
36 require.Equal(t, true, q.isEmpty(), "IsEmpty error")
37 require.Nil(t, q.detach(), "Dequeue error")
38
39 require.Nil(t, newWorkerLoopQueue(0))
40}
41
42func TestLoopQueue(t *testing.T) {
43 size := 10

Callers

nothing calls this directly

Calls 4

newWorkerLoopQueueFunction · 0.85
lenMethod · 0.65
isEmptyMethod · 0.65
detachMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…