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

Function TestAdaptiveRadixTree_Get

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

Source from the content-addressed store, hash-verified

14}
15
16func TestAdaptiveRadixTree_Get(t *testing.T) {
17 art := NewART()
18 art.Put([]byte("key-1"), &data.LogRecordPst{Fid: 1, Offset: 12})
19 pst := art.Get([]byte("key-1"))
20 assert.NotNil(t, pst)
21
22 pst1 := art.Get([]byte("key-not-exist"))
23 assert.Nil(t, pst1)
24
25 art.Put([]byte("key-1"), &data.LogRecordPst{Fid: 12, Offset: 123})
26 pst2 := art.Get([]byte("key-1"))
27 assert.NotNil(t, pst2)
28}
29
30func TestAdaptiveRadixTree_Delete(t *testing.T) {
31 art := NewART()

Callers

nothing calls this directly

Calls 3

NewARTFunction · 0.85
PutMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected