// Verify Flip works correctly with in different regions of bitmap, beginning, middle, and end.
Verify Flip works correctly with in different regions of bitmap, beginning, middle, and end.
// Verify Flip works correctly with in different regions of bitmap beginning middle and end .
func TestBitmap_Flip_After(t *testing.T) {
	bm := roaring.NewFileBitmap(0, 2, 4, 8)
	results := bm.Flip(9, 10)
	if !reflect.DeepEqual(results.Slice(), []uint64{0, 2, 4, 8, 9, 10}) {
		t.Fatalf("unexpected %v ", results.Slice())
	}
	results = results.Flip(0, 1)
	if !reflect.DeepEqual(results.Slice(), []uint64{1, 2, 4, 8, 9, 10}) {
		t.Fatalf("unexpected %v ", results.Slice())
	}
	results = results.Flip(4, 8)
	if !reflect.DeepEqual(results.Slice(), []uint64{1, 2, 5, 6, 7, 9, 10}) {
		t.Fatalf("unexpected %v ", results.Slice())
	}
}
func TestBitmap_Flip_After ( t * testing . T ) { bm := roaring . NewFileBitmap ( 0 , 2 , 4 , 8 ) results := bm . Flip ( 9 , 10 ) if ! reflect . DeepEqual ( results . Slice ( ) , [ ] uint64 { 0 , 2 , 4 , 8 , 9 , 10 } ) { t . Fatalf ( " " , results . Slice ( ) ) } results = results . Flip ( 0 , 1 ) if ! reflect . DeepEqual ( results . Slice ( ) , [ ] uint64 { 1 , 2 , 4 , 8 , 9 , 10 } ) { t . Fatalf ( " " , results . Slice ( ) ) } results = results . Flip ( 4 , 8 ) if ! reflect . DeepEqual ( results . Slice ( ) , [ ] uint64 { 1 , 2 , 5 , 6 , 7 , 9 , 10 } ) { t . Fatalf ( " " , results . Slice ( ) ) } }
Verify Flip works correctly with in different regions of bitmap, beginning, middle, and end.
Verify Flip works correctly with in different regions of bitmap beginning middle and end .