Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jnyfah committed Apr 30, 2024
1 parent 5e87799 commit 825d078
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion tests/core/matrix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ mod inversion_tests {
use super::*;
use crate::proptest::*;
use na::Matrix1;
use proptest::{prop_assert, proptest};
use proptest::{prop_assert, proptest, prop_assert_eq};

proptest! {
#[test]
Expand Down Expand Up @@ -970,6 +970,14 @@ mod inversion_tests {
}
}

#[test]
fn test_inversion_failure_leaves_matrix_unchanged(m in matrix4()) {
let original_matrix = m.clone();
if m.try_inverse().is_none() {
prop_assert_eq!(m, original_matrix);
}
}

#[test]
fn self_mul_inv_is_id_dim6(m in matrix6()) {
if let Some(im) = m.try_inverse() {
Expand Down

0 comments on commit 825d078

Please sign in to comment.