From cf2001942876b3117277cc4bcc20fe4baf3fd865 Mon Sep 17 00:00:00 2001 From: veloukonst <147618898+veloukonst@users.noreply.github.com> Date: Fri, 3 Jan 2025 15:14:01 +0200 Subject: [PATCH] Update RationalTest.java I corrected the mistake in #2897 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..8a26c474a 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 = 1e-8; private void assertDoublesEqual(double x, double y) { - assertThat(x).isEqualTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); + assertThat(x).isCloseTo(y, within(DOUBLE_EQUALITY_TOLERANCE)); } // Tests