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

Function TestAdaptiveRadixTree_Delete

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

Source from the content-addressed store, hash-verified

28}
29
30func TestAdaptiveRadixTree_Delete(t *testing.T) {
31 art := NewART()
32
33 res := art.Delete([]byte("key-not-exist"))
34 assert.False(t, res)
35
36 art.Put([]byte("key-1"), &data.LogRecordPst{Fid: 1, Offset: 12})
37 res1 := art.Delete([]byte("key-1"))
38 assert.True(t, res1)
39
40 pst := art.Get([]byte("key-1"))
41 assert.Nil(t, pst)
42}
43
44func TestAdaptiveRadixTree_Size(t *testing.T) {
45 art := NewART()

Callers

nothing calls this directly

Calls 4

NewARTFunction · 0.85
DeleteMethod · 0.65
PutMethod · 0.65
GetMethod · 0.65

Tested by

no test coverage detected