(t *testing.T)
| 60 | } |
| 61 | |
| 62 | func TestQueueGet(t *testing.T) { |
| 63 | q := New() |
| 64 | |
| 65 | for i := 0; i < 1000; i++ { |
| 66 | q.Add(i) |
| 67 | for j := 0; j < q.Length(); j++ { |
| 68 | if q.Get(j).(int) != j { |
| 69 | t.Errorf("index %d doesn't contain %d", j, j) |
| 70 | } |
| 71 | } |
| 72 | } |
| 73 | } |
| 74 | |
| 75 | func TestQueueGetNegative(t *testing.T) { |
| 76 | q := New() |