let y : any
let i : any
-x = "!0000 ffff_ffff_fff0" as any;
-y = "!0000 0000_0000_0040" as any;
-i = Bigfloats.iter_upto(x, y, 4);
-
-assert_eq(i(), "+0000 0000_0000_0000");
-assert_eq(i(), "+0000 0000_0000_0010");
-assert_eq(i(), "+0000 0000_0000_0020");
-assert_eq(i(), "+0000 0000_0000_0030");
x = "!0000 ffff_ffff_fffe" as any;
y = "!0000 0000_0000_0001" as any;
}
#[throws(RangeBackwards)]
- pub fn range(&self, other: &Mutable, count: u32) -> RangeIterator {
+ pub fn range_upto(&self, other: &Mutable, count: u32) -> RangeIterator {
Mutable::range_core(self, other, count)?.take(count as usize)
}
}
.tinc("vvvvvvvvvv_vvvvvvvvvv_vvvvv01234_0000000000_0001000000")
;
}
+
+ #[test]
+ fn range(){
+ let x = bf("vvvvvvvvv0").clone_mut();
+ let y = bf("0000000040").clone_mut();
+ let mut i = x.range_upto(&y, 4).unwrap();
+ assert_eq!(i.next().unwrap().to_string(), "0000000000");
+ assert_eq!(i.next().unwrap().to_string(), "0000000010");
+ assert_eq!(i.next().unwrap().to_string(), "0000000020");
+ assert_eq!(i.next().unwrap().to_string(), "0000000030");
+ assert_eq!(i.next(), None);
+ }
}