Skip to content

Commit 5bdd96e

Browse files
authored
Update RationalTest.java
Fixed the bug in (#2823) issue
1 parent 6609226 commit 5bdd96e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public class RationalTest {
1111
private static final double DOUBLE_EQUALITY_TOLERANCE = 1e-15;
1212

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

1717
// Tests

0 commit comments

Comments
 (0)