Remove the divmod()-based tests.

This commit is contained in:
2018-03-11 15:33:57 -07:00
parent ded93767ed
commit 716a165007

View File

@@ -778,19 +778,6 @@ macro_rules! construct_unsigned {
assert_eq!(fives % fours, ones);
}
#[test]
fn divmod_tests() {
let a = $type::from_u64(4);
let b = $type::from_u64(3);
let mut q = $type::zero();
let mut r = $type::zero();
a.divmod(&b, &mut q, &mut r);
let mut x = [0; $count];
x[0] = 1;
assert_eq!(q, $type{ contents: x });
assert_eq!(r, $type{ contents: x });
}
quickcheck! {
#[ignore]
fn div_identity(a: $type) -> bool {
@@ -803,9 +790,8 @@ macro_rules! construct_unsigned {
&a / &a == $type::from_u64(1)
}
fn euclid_is_alive(a: $type, b: $type) -> bool {
let mut q = $type::zero();
let mut r = $type::zero();
a.divmod(&b, &mut q, &mut r);
let q = &a / &b;
let r = &a % &b;
a == ((b * q) + r)
}
}