cleaned up comments

This commit is contained in:
Todd Gruben 2017-05-31 10:40:52 -05:00
parent aa713e3832
commit aa13bbb6ce
2 changed files with 5 additions and 4 deletions

View file

@ -673,6 +673,7 @@ func (b *Bitmap) Check() error {
return a
}
//Perform a logical negate of the bits in the range [start,end].
func (b *Bitmap) Flip(start, end uint64) *Bitmap {
result := NewBitmap()
itr := b.Iterator()

View file

@ -168,8 +168,8 @@ func TestBitmap_Xor_BitmapBitmap(t *testing.T) {
}
}
// Ensure bitmap turn on and turn off
func TestBitmap_Fipp_Empty(t *testing.T) {
// Ensure bitmap contents alternate.
func TestBitmap_Flip_Empty(t *testing.T) {
bm := roaring.NewBitmap()
results := bm.Flip(0, 10)
if n := results.Count(); n != 10 {
@ -182,7 +182,7 @@ func TestBitmap_Fipp_Empty(t *testing.T) {
}
// Test Subrange Flip should not affect bits outside of Range
func TestBitmap_Fipp_Array(t *testing.T) {
func TestBitmap_Flip_Array(t *testing.T) {
bm := roaring.NewBitmap(0, 1, 2, 3, 4, 8, 16, 32, 64, 128, 256, 512, 1024)
results := bm.Flip(0, 5)
if n := results.Count(); n != 8 {
@ -195,7 +195,7 @@ func TestBitmap_Fipp_Array(t *testing.T) {
}
func TestBitmap_Fipp_Bitmap(t *testing.T) {
func TestBitmap_Flip_Bitmap(t *testing.T) {
bm := roaring.NewBitmap()
size := uint64(10000)
for i := uint64(0); i < size; i += 2 {