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

Function TestBitMapStructure_GetBit

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

Source from the content-addressed store, hash-verified

38}
39
40func TestBitMapStructure_GetBit(t *testing.T) {
41 bitmap := initBitMap()
42 defer bitmap.db.Clean()
43
44 // Test GetBit function
45 bitmapErr = bitmap.SetBit(string(randkv.GetTestKey(1)), 0, true)
46 assert.Nil(t, bitmapErr)
47 value, err := bitmap.GetBit(string(randkv.GetTestKey(1)), 0)
48 assert.Nil(t, err)
49 assert.Equal(t, true, value)
50}
51
52func TestBitMapStructure_GetBits(t *testing.T) {
53 bitmap := initBitMap()

Callers

nothing calls this directly

Calls 5

GetTestKeyFunction · 0.92
initBitMapFunction · 0.85
CleanMethod · 0.45
SetBitMethod · 0.45
GetBitMethod · 0.45

Tested by

no test coverage detected