(t *testing.T)
| 48 | } |
| 49 | |
| 50 | func TestBitmapStructure_GetBits(t *testing.T) { |
| 51 | // Setup the bitmap structure |
| 52 | bm := initBitmap() |
| 53 | |
| 54 | err := bm.SetBit("1", 2) |
| 55 | assert.NoError(t, err) |
| 56 | val, err := bm.GetBits("1") |
| 57 | assert.NoError(t, err) |
| 58 | assert.True(t, val.At(2)) |
| 59 | |
| 60 | // add one other bit |
| 61 | err = bm.SetBit("1", 7) |
| 62 | val, err = bm.GetBits("1") |
| 63 | assert.NoError(t, err) |
| 64 | assert.True(t, val.At(7)) |
| 65 | assert.False(t, val.At(8)) |
| 66 | } |
| 67 | |
| 68 | func TestBitmapStructure_GetBit(t *testing.T) { |
| 69 | // Setup the bitmap structure |
nothing calls this directly
no test coverage detected