MCPcopy Create free account
hub / github.com/ByteStorage/FlyDB / TestAdaptiveRadixTree_Iterator

Function TestAdaptiveRadixTree_Iterator

engine/index/art_test.go:55–69  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

53}
54
55func TestAdaptiveRadixTree_Iterator(t *testing.T) {
56 art := NewART()
57
58 art.Put([]byte("cdef"), &data.LogRecordPst{Fid: 1, Offset: 12})
59 art.Put([]byte("bcde"), &data.LogRecordPst{Fid: 1, Offset: 12})
60 art.Put([]byte("abcd"), &data.LogRecordPst{Fid: 1, Offset: 12})
61 art.Put([]byte("bdfg"), &data.LogRecordPst{Fid: 1, Offset: 12})
62
63 iter := art.Iterator(false)
64 for iter.Rewind(); iter.Valid(); iter.Next() {
65 assert.NotNil(t, iter.Key())
66 assert.NotNil(t, iter.Value())
67 }
68
69}

Callers

nothing calls this directly

Calls 8

NewARTFunction · 0.85
PutMethod · 0.65
IteratorMethod · 0.65
RewindMethod · 0.65
ValidMethod · 0.65
NextMethod · 0.65
KeyMethod · 0.65
ValueMethod · 0.65

Tested by

no test coverage detected