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

Function TestBitMapStructure_BitDels

structure/bitmap_1_test.go:106–118  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

104}
105
106func TestBitMapStructure_BitDels(t *testing.T) {
107 bitmap := initBitMap()
108 defer bitmap.db.Clean()
109
110 // Test BitDels function
111 bitmapErr = bitmap.SetBits(string(randkv.GetTestKey(1)), 0, true, 1, false, 2, true)
112 assert.Nil(t, bitmapErr)
113 bitmapErr = bitmap.BitDels(string(randkv.GetTestKey(1)), 0, 1)
114 assert.Nil(t, bitmapErr)
115 values, err := bitmap.GetBits(string(randkv.GetTestKey(1)), 0)
116 assert.Nil(t, err)
117 assert.Equal(t, []bool{true}, values)
118}
119
120func TestBitMapStructure_Integration(t *testing.T) {
121 opts := config.DefaultOptions

Callers

nothing calls this directly

Calls 6

GetTestKeyFunction · 0.92
initBitMapFunction · 0.85
BitDelsMethod · 0.80
CleanMethod · 0.45
SetBitsMethod · 0.45
GetBitsMethod · 0.45

Tested by

no test coverage detected