fix function tests

This commit is contained in:
Simon Gardling 2025-12-03 20:03:59 -05:00
parent 9d96977785
commit e96fcdbe99
Signed by: titaniumtown
GPG Key ID: 9AB28AC10ECE533D

View File

@ -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);
}
}
}