(t *testing.T)
| 86 | } |
| 87 | |
| 88 | func 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 | |
| 104 | func TestQueuePeekOutOfRangePanics(t *testing.T) { |
| 105 | q := New() |
nothing calls this directly
no test coverage detected
searching dependent graphs…