// Ensure a bitmap can loop over a set of values in a range.
Ensure a bitmap can loop over a set of values in a range.
// Ensure a bitmap can loop over a set of values in a range .
func TestBitmap_ForEachRange(t *testing.T) {
	var a []uint64
	roaring.NewFileBitmap(1, 2, 3, 4).ForEachRange(2, 4, func(v uint64) {
		a = append(a, v)
	})
	if !reflect.DeepEqual(a, []uint64{2, 3}) {
		t.Fatalf("unexpected values: %+v", a)
	}
}
func TestBitmap_ForEachRange ( t * testing . T ) { var a [ ] uint64 roaring . NewFileBitmap ( 1 , 2 , 3 , 4 ) . ForEachRange ( 2 , 4 , func ( v uint64 ) { a = append ( a , v ) } ) if ! reflect . DeepEqual ( a , [ ] uint64 { 2 , 3 } ) { t . Fatalf ( " " , a ) } }
Ensure a bitmap can loop over a set of values in a range.
Ensure a bitmap can loop over a set of values in a range .