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

Function TestQueueGetOutOfRangePanics

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

Source from the content-addressed store, hash-verified

86}
87
88func TestQueueGetOutOfRangePanics(t *testing.T) {
89 q := New()
90
91 q.Add(1)
92 q.Add(2)
93 q.Add(3)
94
95 assertPanics(t, "should panic when negative index", func() {
96 q.Get(-4)
97 })
98
99 assertPanics(t, "should panic when index greater than length", func() {
100 q.Get(4)
101 })
102}
103
104func TestQueuePeekOutOfRangePanics(t *testing.T) {
105 q := New()

Callers

nothing calls this directly

Calls 4

NewFunction · 0.85
assertPanicsFunction · 0.85
AddMethod · 0.80
GetMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…