Add test that an empty vector field inversion returns one.

This commit is contained in:
Sean Bowe 2018-06-30 16:29:02 -06:00
parent 11b1dc142f
commit 611fc40318
No known key found for this signature in database
GPG key ID: 95684257D8F8B031

View file

@ -1139,6 +1139,11 @@ mod test {
Scalar::batch_invert(&mut xs);
}
#[test]
fn batch_invert_empty() {
assert_eq!(Scalar::one(), Scalar::batch_invert(&mut []));
}
#[test]
fn batch_invert_consistency() {
let mut x = Scalar::from_u64(1);