(t *testing.T)
| 47 | } |
| 48 | |
| 49 | func TestGetSetCompressedBit(t *testing.T) { |
| 50 | ba := newSparseBitArray() |
| 51 | |
| 52 | ba.SetBit(5) |
| 53 | |
| 54 | result, err := ba.GetBit(5) |
| 55 | assert.Nil(t, err) |
| 56 | assert.True(t, result) |
| 57 | result, err = ba.GetBit(7) |
| 58 | assert.Nil(t, err) |
| 59 | assert.False(t, result) |
| 60 | |
| 61 | ba.SetBit(s * 2) |
| 62 | result, _ = ba.GetBit(s * 2) |
| 63 | assert.True(t, result) |
| 64 | result, _ = ba.GetBit(s*2 + 1) |
| 65 | assert.False(t, result) |
| 66 | } |
| 67 | |
| 68 | func BenchmarkSetCompressedBit(b *testing.B) { |
| 69 | numItems := 1000 |
nothing calls this directly
no test coverage detected
searching dependent graphs…