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

Function TestBitmapStructure_GetBit

structure/bitmap_test.go:68–79  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

66}
67
68func TestBitmapStructure_GetBit(t *testing.T) {
69 // Setup the bitmap structure
70 bm := initBitmap()
71
72 err := bm.SetBit("1", 2)
73 assert.NoError(t, err)
74 val, err := bm.GetBit("1", 2)
75 assert.NoError(t, err)
76 assert.True(t, val)
77 val, _ = bm.GetBit("1", 1)
78 assert.False(t, val)
79}
80
81func TestBitmapStructure_DelBit(t *testing.T) {
82 bm := initBitmap()

Callers

nothing calls this directly

Calls 3

initBitmapFunction · 0.85
SetBitMethod · 0.45
GetBitMethod · 0.45

Tested by

no test coverage detected