From e96fcdbe999367b9ba0503e3a2783d5f92547a86 Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Wed, 3 Dec 2025 20:03:59 -0500 Subject: [PATCH] fix function tests --- tests/function.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tests/function.rs b/tests/function.rs index f5912ba..42be887 100644 --- a/tests/function.rs +++ b/tests/function.rs @@ -84,7 +84,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a[i].0 as f32, DERIVATIVE_TARGET[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a[i].1 as f32, DERIVATIVE_TARGET[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a, DERIVATIVE_TARGET); + panic!("Expected: {:?}\nGot: {:?}", DERIVATIVE_TARGET, a); } } @@ -98,7 +98,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a_1[i].0 as f32, BACK_TARGET[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a_1[i].1 as f32, BACK_TARGET[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a_1, BACK_TARGET); + panic!("Expected: {:?}\nGot: {:?}", BACK_TARGET, a_1); } } } @@ -131,7 +131,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a[i].0 as f32, b[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a[i].1 as f32, b[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a, b); + panic!("Expected: {:?}\nGot: {:?}", b, a); } } @@ -160,7 +160,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a_1[i].0 as f32, b_1[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a_1[i].1 as f32, b_1[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a_1, b_1); + panic!("Expected: {:?}\nGot: {:?}", b_1, a_1); } } } @@ -193,7 +193,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a[i].0 as f32, b[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a[i].1 as f32, b[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a, b); + panic!("Expected: {:?}\nGot: {:?}", b, a); } } @@ -222,7 +222,7 @@ fn do_test(sum: Riemann, area_target: f64) { if !emath::almost_equal(a_1[i].0 as f32, b_1[i].0 as f32, f32::EPSILON) | !emath::almost_equal(a_1[i].1 as f32, b_1[i].1 as f32, f32::EPSILON) { - panic!("Expected: {:?}\nGot: {:?}", a_1, b_1); + panic!("Expected: {:?}\nGot: {:?}", b_1, a_1); } } }