Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update CarsAssembleTest.java (#2521)
* Update CarsAssembleTest.java Tests for Task 1 used a boolean comparison to determine whether tests pass. Replaced those with more idiomatic assertEquals(double, double, epsilon) form. When the new style of test fails the user is shown the expected value and the actual value: Expected :1591.2 Actual :1989.0 The previous implementation showed the user the less clear: Expected :true Actual :false The test implementation being replaced required the comparison to be strictly less than epsilon, not inclusive of epsilon. The JUnit assertEquals replacement check is inclusive of epsilon. OLD: Math.abs(value1 - value2) < epsilon) NEW: Math.abs(value1 - value2) <= epsilon Given an epsilon of 0.0000001d this is unlikely to see any existing solutions fail given the expected answers only check the tenths place. * Update CarsAssembleTest.java Use AssertJ isCloseTo style assertion instead of JUnit assertEquals.
- Loading branch information