(t *testing.T)
| 340 | } |
| 341 | |
| 342 | func TestComplement(t *testing.T) { |
| 343 | ba := newBitArray(10) |
| 344 | |
| 345 | ba.SetBit(5) |
| 346 | |
| 347 | ba.complement() |
| 348 | |
| 349 | if ok, _ := ba.GetBit(5); ok { |
| 350 | t.Errorf(`Expected clear.`) |
| 351 | } |
| 352 | |
| 353 | if ok, _ := ba.GetBit(4); !ok { |
| 354 | t.Errorf(`Expected set.`) |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | func BenchmarkComplement(b *testing.B) { |
| 359 | ba := newBitArray(160000) |
nothing calls this directly
no test coverage detected
searching dependent graphs…