Closed Isira-Seneviratne closed 3 years ago
Thanks @Isira-Seneviratne - these changes look good. A few good quality improvements in here as well.
Actually, this causes significant test failures (nearly all tests fail, it seems). I believe the default reference time past/future comparison has been inverted by these changes.
Example:
Running org.ocpsoft.prettytime.PrettyTimeTest
Tests run: 46, Failures: 36, Errors: 0, Skipped: 1, Time elapsed: 0.014 sec <<< FAILURE! - in org.ocpsoft.prettytime.PrettyTimeTest
testCeilingInterval(org.ocpsoft.prettytime.PrettyTimeTest) Time elapsed: 0 sec <<< FAILURE!
org.junit.ComparisonFailure: expected:<1 month [ago]> but was:<1 month [from now]>
at org.junit.Assert.assertEquals(Assert.java:123)
at org.junit.Assert.assertEquals(Assert.java:145)
at org.ocpsoft.prettytime.PrettyTimeTest.testCeilingInterval(PrettyTimeTest.java:52)
@Isira-Seneviratne could you run the tests on your end and verify?
Also, apologies for merging this prematurely. It would have been easier for you if I'd left this branch open. GitHub does not appear to allow re-opening merged PRs.
Fix some issues related to the
java.time
changes.