add assert

This commit is contained in:
Jennifer Chukwu 2024-05-02 14:36:28 +00:00
parent e3a08c9b60
commit 914a7cf1fa

View File

@ -1264,7 +1264,7 @@ fn column_iterator_double_ended_mut() {
} }
#[test] #[test]
fn test_inversion_failure_leaves_matrix_unchanged() { fn test_inversion_failure_leaves_matrix4_unchanged() {
let mut mat = na::Matrix4::new( let mut mat = na::Matrix4::new(
1.0, 2.0, 3.0, 4.0, 1.0, 2.0, 3.0, 4.0,
2.0, 4.0, 6.0, 8.0, 2.0, 4.0, 6.0, 8.0,
@ -1272,9 +1272,8 @@ fn test_inversion_failure_leaves_matrix_unchanged() {
4.0, 8.0, 12.0, 16.0 4.0, 8.0, 12.0, 16.0
); );
let expected = mat.clone(); let expected = mat.clone();
if !mat.try_inverse_mut() { assert!(!mat.try_inverse_mut());
assert_eq!(mat, expected); assert_eq!(mat, expected);
}
} }
#[test] #[test]