diff --git a/argmin-math/src/primitives/minmax.rs b/argmin-math/src/primitives/minmax.rs index 14b1527e3..e66f3b041 100644 --- a/argmin-math/src/primitives/minmax.rs +++ b/argmin-math/src/primitives/minmax.rs @@ -64,6 +64,8 @@ mod tests { let y = 10 as $t; assert_eq!(<$t as ArgminMinMax>::min(&x, &y), x); assert_eq!(<$t as ArgminMinMax>::max(&x, &y), y); + assert_eq!(<$t as ArgminMinMax>::min(&y, &x), x); + assert_eq!(<$t as ArgminMinMax>::max(&y, &x), y); } } } @@ -71,4 +73,4 @@ mod tests { make_test!(f32); make_test!(f64); -} +} \ No newline at end of file