[threeten-dev] Please help to review new test code for java.time.calendars.JapaneseChronology
Stephen Colebourne
scolebourne at joda.org
Wed Jan 30 02:37:07 PST 2013
Looks good to me.
Stephen
On 30 January 2013 09:34, patrick zhang <patrick.zhang at oracle.com> wrote:
> The text of webrev/result link looks good. But it seems it points to
> incorrect url. Please copy it to browser then open it. Or click below
> updated link directly.
>
> webrev
> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/JapaneseChronology/
>
> test result:
> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/JapaneseChronology/TestJapaneseChronology.jtr
>
> Regards
> Patrick
>
>
> On 2013-1-30 14:46, Patrick Zhang wrote:
>
> Hi Team,
>
> Please help to review below new added test case:
> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/JapaneseChronology/test/java/time/tck/java/time/calendars/TestJapaneseChronology.java.udiff.html
>
> test result:
> http://cr.openjdk.java.net/~pzhang/JSR310/java/time/calendars/JapaneseChronology/TestJapaneseChronology.jtr
>
> Description:
> The new added test cases are used for prolepticYear(), datYearDay and
> isLeapYear().
> 1. As positive test case, some leapYear/02/29 are verified with according
> ISO date. And as negative test case, some non-leapYear/02/29 are added in
> "badDates" data provider and it should throw DateTimeException. And we use
> both dateYearDay(year, doy) and date(era, year, month, dom) to construct
> same ISO date to confirm it works well.
>
> 2. Since prolepticYear of JapaneseChronology is same with ISO calendar
> system, then for all eras, we can confirm below formula should work:
> prolepticYear(ear, a) = a + era_diff
>
> JapaneseChronology leap year is same with ISO leap year. Then we can confirm
> isLeapYear(prolepticYear) should return same value with
> Year.of(prolepticYear).isLeap() safely.
>
> Above logic has been verified in test_prolepticYear().
>
> Regards
> Patrick
More information about the threeten-dev
mailing list