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

Function TestQueueRemoveOutOfRangePanics

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

Source from the content-addressed store, hash-verified

117}
118
119func TestQueueRemoveOutOfRangePanics(t *testing.T) {
120 q := New()
121
122 assertPanics(t, "should panic when removing empty queue", func() {
123 q.Remove()
124 })
125
126 q.Add(1)
127 q.Remove()
128
129 assertPanics(t, "should panic when removing emptied queue", func() {
130 q.Remove()
131 })
132}
133
134func assertPanics(t *testing.T, name string, f func()) {
135 defer func() {

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…