From 15e18347975edae4212062446f17f0702d5ccf38 Mon Sep 17 00:00:00 2001 From: Nikolas <147613528+stamatisn@users.noreply.github.com> Date: Tue, 31 Dec 2024 11:57:50 +0200 Subject: [PATCH] Changes in RationalTest.java Correcting the error I made in (#2886). no important files changed --- .../practice/rational-numbers/src/test/java/RationalTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/exercises/practice/rational-numbers/src/test/java/RationalTest.java b/exercises/practice/rational-numbers/src/test/java/RationalTest.java index 7eb882688..9f90d4457 100644 --- a/exercises/practice/rational-numbers/src/test/java/RationalTest.java +++ b/exercises/practice/rational-numbers/src/test/java/RationalTest.java @@ -8,10 +8,10 @@ public class RationalTest { // Helper methods - private static final double DOUBLE_EQUALITY_TOLERANCE = 1e-15; + private static final double DOUBLE_EQUALITY_TOLERANCE = 2e-15; private void assertDoublesEqual(double x, double y) { - assertThat(x).isEqualTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); + assertThat(x).isCloseTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); } // Tests