[threeten-dev] Please help to review new test cases for java.time.Year and java.time.YearMonth

patrick zhang patrick.zhang at oracle.com
Fri Mar 15 01:27:43 PDT 2013


Hi Team,

Please help to review new added test case for java.time.Year and 
java.time.YearMonth.
Included apis:

plus(long, TemporalUnit)
minus(long, TemporalUnit)
plus(TemporalAmount)
minus(TemporalAmount)
with(TemporalField, long)
with(TemporalAdjuster)

As past discussion about ChronoUnit.ERAS,  plus(1, ChronoUnit.ERAS) will 
plus 1 on ERA field directly nor plus 1,000,000,000 years.
So it will change 1BCE to 1CE.
For example,
    Year.of(-1).plus(1, ChronoUnit.ERAS) = Year.of(2)
    Year.of(1).minus(1, ChronoUnit.ERAS) = Year.of(0)

Above logic have been checked in plus(long, TemporalUnit) and 
minus(long, TemporalUnit) for Year/YearMonth

webrev:
http://cr.openjdk.java.net/~pzhang/JSR310/java/time/Year/webrev/

result:
http://cr.openjdk.java.net/~pzhang/JSR310/java/time/Year/TCKYear.jtr
http://cr.openjdk.java.net/~pzhang/JSR310/java/time/Year/TCKYearMonth.jtr

Regards
Patrick


More information about the threeten-dev mailing list