(t *testing.T)
| 145 | } |
| 146 | |
| 147 | func TestClearCompressedBit(t *testing.T) { |
| 148 | ba := newSparseBitArray() |
| 149 | ba.SetBit(5) |
| 150 | ba.ClearBit(5) |
| 151 | |
| 152 | result, err := ba.GetBit(5) |
| 153 | assert.Nil(t, err) |
| 154 | assert.False(t, result) |
| 155 | assert.Len(t, ba.blocks, 0) |
| 156 | assert.Len(t, ba.indices, 0) |
| 157 | |
| 158 | ba.SetBit(s * 2) |
| 159 | ba.ClearBit(s * 2) |
| 160 | |
| 161 | result, _ = ba.GetBit(s * 2) |
| 162 | assert.False(t, result) |
| 163 | assert.Len(t, ba.indices, 0) |
| 164 | assert.Len(t, ba.blocks, 0) |
| 165 | } |
| 166 | |
| 167 | func BenchmarkClearCompressedBit(b *testing.B) { |
| 168 | numItems := 1000 |
nothing calls this directly
no test coverage detected
searching dependent graphs…