(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestBitmapStructure_BitCount(t *testing.T) { |
| 117 | bm := initBitmap() |
| 118 | |
| 119 | err := bm.SetBits("1", 2, 3, 4, 5, 6, 10, 11, 12, 13, 14, 15) |
| 120 | assert.NoError(t, err) |
| 121 | count, err := bm.BitCount("1", 3, 10) |
| 122 | assert.NoError(t, err) |
| 123 | assert.Equal(t, uint(5), count) |
| 124 | // check over the end |
| 125 | count, err = bm.BitCount("1", 10, 100) |
| 126 | assert.NoError(t, err) |
| 127 | assert.Equal(t, uint(6), count) |
| 128 | } |
| 129 | |
| 130 | func TestBitmapStructure_BitOp(t *testing.T) { |
| 131 | type bitmapStruct struct { |
nothing calls this directly
no test coverage detected