MCPcopy Index your code
hub / github.com/eapache/queue / TestQueueSimple

Function TestQueueSimple

queue_test.go:5–20  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

3import "testing"
4
5func TestQueueSimple(t *testing.T) {
6 q := New()
7
8 for i := 0; i < minQueueLen; i++ {
9 q.Add(i)
10 }
11 for i := 0; i < minQueueLen; i++ {
12 if q.Peek().(int) != i {
13 t.Error("peek", i, "had value", q.Peek())
14 }
15 x := q.Remove()
16 if x != i {
17 t.Error("remove", i, "had value", x)
18 }
19 }
20}
21
22func TestQueueWrapping(t *testing.T) {
23 q := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
AddMethod · 0.80
PeekMethod · 0.80
RemoveMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…