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

Function TestBitMapStructure_GetBits

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

Source from the content-addressed store, hash-verified

50}
51
52func TestBitMapStructure_GetBits(t *testing.T) {
53 bitmap := initBitMap()
54 defer bitmap.db.Clean()
55
56 // Test GetBits function
57 bitmapErr = bitmap.SetBits(string(randkv.GetTestKey(1)), 0, true, 1, false)
58 assert.Nil(t, bitmapErr)
59 values, err := bitmap.GetBits(string(randkv.GetTestKey(1)), 0, 1)
60 assert.Nil(t, err)
61 assert.Equal(t, []bool{true, false}, values)
62}
63
64func TestBitMapStructure_BitCount(t *testing.T) {
65 bitmap := initBitMap()

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected