MCPcopy
hub / github.com/emirpasic/gods / TestQueueIteratorBegin

Function TestQueueIteratorBegin

queues/circularbuffer/circularbuffer_test.go:243–257  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

241}
242
243func TestQueueIteratorBegin(t *testing.T) {
244 queue := New(3)
245 it := queue.Iterator()
246 it.Begin()
247 queue.Enqueue("a")
248 queue.Enqueue("b")
249 queue.Enqueue("c")
250 for it.Next() {
251 }
252 it.Begin()
253 it.Next()
254 if index, value := it.Index(), it.Value(); index != 0 || value != "a" {
255 t.Errorf("Got %v,%v expected %v,%v", index, value, 0, "a")
256 }
257}
258
259func TestQueueIteratorEnd(t *testing.T) {
260 queue := New(3)

Callers

nothing calls this directly

Calls 7

NewFunction · 0.70
BeginMethod · 0.65
EnqueueMethod · 0.65
NextMethod · 0.65
IndexMethod · 0.65
ValueMethod · 0.65
IteratorMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…