Skip to content

Commit

Permalink
add test inv of zero error
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicole authored and Nicole committed Nov 25, 2024
1 parent cbd52a8 commit e2a34af
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions math/src/field/fields/fft_friendly/quartic_babybear.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,12 @@ mod tests {
assert_eq!(a.inv().unwrap(), a);
}

#[test]
fn test_inv_of_zero_error() {
let result = Fp4E::zero().inv();
assert!(result.is_err());
}

#[test]
fn test_mul_by_inv_is_identity() {
let a = Fp4E::from(123456);
Expand Down

0 comments on commit e2a34af

Please sign in to comment.