From 40d4f860b62d8bd6a977c81722b0177e5370d514 Mon Sep 17 00:00:00 2001 From: Johanna Date: Mon, 16 Sep 2024 08:15:36 +0100 Subject: [PATCH] add status badges --- tests/distance.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/distance.rs b/tests/distance.rs index 63383c2..f9233fd 100644 --- a/tests/distance.rs +++ b/tests/distance.rs @@ -24,14 +24,14 @@ mod tests { let rounded_expected = (expected * 1000.0).round() / 1000.0; let abs_tolerance = 0.05; - let diff = (actual - expected).abs(); + let diff = (rounded_actual - rounded_expected).abs(); assert!( diff <= abs_tolerance, "Absolute difference exceeds tolerance of {}. Actual: {}, Expected: {}", abs_tolerance, - actual, - expected + rounded_actual, + rounded_expected ); }