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

Function TestQueuePeekOutOfRangePanics

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

Source from the content-addressed store, hash-verified

102}
103
104func TestQueuePeekOutOfRangePanics(t *testing.T) {
105 q := New()
106
107 assertPanics(t, "should panic when peeking empty queue", func() {
108 q.Peek()
109 })
110
111 q.Add(1)
112 q.Remove()
113
114 assertPanics(t, "should panic when peeking emptied queue", func() {
115 q.Peek()
116 })
117}
118
119func TestQueueRemoveOutOfRangePanics(t *testing.T) {
120 q := New()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…