(t *testing.T)
| 456 | } |
| 457 | |
| 458 | func TestBitmapcontainerNextHasMany(t *testing.T) { |
| 459 | t.Run("Empty Bitmap", func(t *testing.T) { |
| 460 | bc := newBitmapContainer() |
| 461 | iterator := newBitmapContainerManyIterator(bc) |
| 462 | high := uint64(1024) |
| 463 | buf := []uint64{} |
| 464 | result := iterator.nextMany64(high, buf) |
| 465 | assert.Equal(t, 0, result) |
| 466 | }) |
| 467 | |
| 468 | t.Run("512 in iterator and buf size 512", func(t *testing.T) { |
| 469 | bc := newBitmapContainer() |
| 470 | bc.iaddRange(0, 512) |
| 471 | iterator := newBitmapContainerManyIterator(bc) |
| 472 | high := uint64(1024) |
| 473 | buf := make([]uint64, 512) |
| 474 | result := iterator.nextMany64(high, buf) |
| 475 | assert.Equal(t, 512, result) |
| 476 | }) |
| 477 | |
| 478 | t.Run("512 in iterator and buf size 256", func(t *testing.T) { |
| 479 | bc := newBitmapContainer() |
| 480 | bc.iaddRange(0, 512) |
| 481 | iterator := newBitmapContainerManyIterator(bc) |
| 482 | high := uint64(1024) |
| 483 | buf := make([]uint64, 256) |
| 484 | result := iterator.nextMany64(high, buf) |
| 485 | assert.Equal(t, 256, result) |
| 486 | }) |
| 487 | } |
| 488 | |
| 489 | func TestBitmapcontainerOrArrayCardinality(t *testing.T) { |
| 490 | t.Run("Empty Bitmap and Empty Array", func(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…