Barrett versions of modsq/modmul/modexp, with tests.

This commit is contained in:
2018-10-04 20:52:41 -07:00
parent fe43949684
commit 24ad31df0d
54 changed files with 264545 additions and 192254 deletions

View File

@@ -85,10 +85,12 @@ macro_rules! generate_sub_tests {
let (neg2, cbytes) = case.get("c").unwrap();
assert!(!neg0 && !neg1 && !neg2);
let a = $name::from_bytes(abytes);
let b = $name::from_bytes(bbytes);
let c = $name::from_bytes(cbytes);
assert_eq!(c, a - b);
let mut a = $name::from_bytes(abytes);
let b = $name::from_bytes(bbytes);
let c = $name::from_bytes(cbytes);
assert_eq!(c, &a - &b);
a -= b;
assert_eq!(c, a);
});
}
};