[threeten-dev] Please help to review new test code for java.time.Instant

Patrick Zhang patrick.zhang at oracle.com
Fri Jan 11 00:27:34 PST 2013


Hi Team,

Please help to review below new added test case:
http://cr.openjdk.java.net/~sherman/jdk8_threeten/patrick/instant/

In current test code, Instant.minus(TemporalSubtractor substractor) has 
been included but Instant.minus(long amountToSubtract, TemporalUnit 
unit) is missed.

So below 3 methods are added to cover it:
==================
minus_TemporalUnit()
minus_TemporalUnit_overflowTooSmall()
minus_TemporalUnit_overflowTooBig()
==================

Actually the logic is same with existing minus_Duration(), 
minus_Duration_overflowTooSmall() and minus_Duration_overflowTooBig(). I 
just use Instant.minus(long amountToSubtract, TemporalUnit unit) to 
replace Instant.minus(TemporalSubtractor substractor).

Test result is here:
http://sqeweb.us.oracle.com/jsn/users/patrick/newresult1/work/java/time/tck/java/time/TCKInstant.jtr 


Regards
Patrick



More information about the threeten-dev mailing list