(t *testing.T)
| 14 | } |
| 15 | |
| 16 | func 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 | |
| 30 | func TestAdaptiveRadixTree_Delete(t *testing.T) { |
| 31 | art := NewART() |