// Ensure  Flip works with underlying Bitmap container.
Ensure  Flip works with underlying Bitmap container.
// Ensure Flip works with underlying Bitmap container .
func TestBitmap_Flip_Bitmap(t *testing.T) {
	bm := roaring.NewFileBitmap()
	size := uint64(10000)
	for i := uint64(0); i < size; i += 2 {
		bm.Add(i)
	}
	results := bm.Flip(0, size-1)
	if n := results.Count(); n != size/2 {
		t.Fatalf("unexpected n: %d", n)
	}
	results = results.Flip(0, size-1) 
	if n := results.Count(); n != size/2 {
		t.Fatalf("unexpected n: %d", n)
	}
}
func TestBitmap_Flip_Bitmap ( t * testing . T ) { bm := roaring . NewFileBitmap ( ) size := uint64 ( 10000 ) for i := uint64 ( 0 ) ; i < size ; i += 2 { bm . Add ( i ) } results := bm . Flip ( 0 , size - 1 ) if n := results . Count ( ) ; n != size / 2 { t . Fatalf ( " " , n ) } results = results . Flip ( 0 , size - 1 ) if n := results . Count ( ) ; n != size / 2 { t . Fatalf ( " " , n ) } }
Ensure  Flip works with underlying Bitmap container.
Ensure Flip works with underlying Bitmap container .
//flipping back should be the same