Skip to content

Commit cf20019

Browse files
authored
Update RationalTest.java
I corrected the mistake in #2897 No important files changed.
1 parent bce1d70 commit cf20019

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

exercises/practice/rational-numbers/src/test/java/RationalTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@ public class RationalTest {
88

99
// Helper methods
1010

11-
private static final double DOUBLE_EQUALITY_TOLERANCE = 1e-15;
11+
private static final double DOUBLE_EQUALITY_TOLERANCE = 1e-8;
1212

1313
private void assertDoublesEqual(double x, double y) {
14-
assertThat(x).isEqualTo(y, within(DOUBLE_EQUALITY_TOLERANCE));
14+
assertThat(x).isCloseTo(y, within(DOUBLE_EQUALITY_TOLERANCE));
1515
}
1616

1717
// Tests

0 commit comments

Comments
 (0)