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

Function TestAdaptiveRadixTree_Size

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

Source from the content-addressed store, hash-verified

42}
43
44func TestAdaptiveRadixTree_Size(t *testing.T) {
45 art := NewART()
46
47 assert.Equal(t, 0, art.Size())
48
49 art.Put([]byte("key-1"), &data.LogRecordPst{Fid: 1, Offset: 12})
50 art.Put([]byte("key-2"), &data.LogRecordPst{Fid: 1, Offset: 12})
51 art.Put([]byte("key-1"), &data.LogRecordPst{Fid: 12, Offset: 123})
52 assert.Equal(t, 2, art.Size())
53}
54
55func TestAdaptiveRadixTree_Iterator(t *testing.T) {
56 art := NewART()

Callers

nothing calls this directly

Calls 3

NewARTFunction · 0.85
SizeMethod · 0.65
PutMethod · 0.65

Tested by

no test coverage detected