forked from M-Labs/nalgebra
add tests
This commit is contained in:
parent
5e8779957e
commit
825d078294
@ -931,7 +931,7 @@ mod inversion_tests {
|
|||||||
use super::*;
|
use super::*;
|
||||||
use crate::proptest::*;
|
use crate::proptest::*;
|
||||||
use na::Matrix1;
|
use na::Matrix1;
|
||||||
use proptest::{prop_assert, proptest};
|
use proptest::{prop_assert, proptest, prop_assert_eq};
|
||||||
|
|
||||||
proptest! {
|
proptest! {
|
||||||
#[test]
|
#[test]
|
||||||
@ -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]
|
#[test]
|
||||||
fn self_mul_inv_is_id_dim6(m in matrix6()) {
|
fn self_mul_inv_is_id_dim6(m in matrix6()) {
|
||||||
if let Some(im) = m.try_inverse() {
|
if let Some(im) = m.try_inverse() {
|
||||||
|
Loading…
Reference in New Issue
Block a user