harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Geir Magnusson Jr." <g...@pobox.com>
Subject Re: [classlib] Should tests.api.java.util.GregorianCalendarTest be excluded
Date Thu, 15 Mar 2007 11:25:47 GMT

On Mar 14, 2007, at 5:35 PM, Nathan Beyer wrote:

> I apologize for the delay response, I've been a little busy lately.

Hey, we all are.

>
> I ran the test on Sun JRE 5 Update 11 and Sun JRE 6 and this bit of
> the getI test failed as well.
>        // Regression test for Hamrony-2959
>        Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>        GregorianCalendar gc = new GregorianCalendar();
>        gc.setGregorianChange(date);
>        gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
>        assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>
> The failure was exactly the same.
>
> junit.framework.AssertionFailedError: expected:<346> but was:<345>
>
> I tried running the [1] snippet below, but I had to change
> 'Calendar.Date' to 'Calendar.DATE'. I presume this was just a quick
> typo. The output of this when I run it on the same Sun JREs as
> mentioned above is 23.


Any idea why it used to work?

geir

>
> -Nathan
>
> On 3/12/07, Tony Wu <wuyuehao@gmail.com> wrote:
>> Hi Nathan,
>> This testcase passes on my winxp sp2 and ubuntu with ibm vme, besides
>> our build system on debian. I can not reproduce it and IIRC there is
>> no DST in Dec and Jan. Could you pls help me to verify whether it
>> passes on RI and the output of code[1] and the testcase[2].  Thanks a
>> lot.
>>
>> [1]
>>
>> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>> GregorianCalendar gc = new GregorianCalendar();
>> gc.setGregorianChange(date);
>> gc.setTimeInMillis(Date.parse("Dec 24 00:00:01 GMT 2000"));
>> System.out.println(gc.get(Calendar.Date));
>>
>> [2]
>>
>> Date date = new Date(Date.parse("Jan 15 00:00:01 GMT 2000"));
>> GregorianCalendar gc = new GregorianCalendar();
>> gc.setGregorianChange(date);
>> gc.setTimeInMillis(Date.parse("Dec 24 12:00:01 GMT 2000"));
>> System.out.println(gc.get(Calendar.Date));
>> assertEquals(346, gc.get(Calendar.DAY_OF_YEAR));
>>
>>
>> On 3/12/07, Nathan Beyer <ndbeyer@apache.org> wrote:
>> > I hope not.
>> >
>> > According to my Win2K builds, this test has failed since 3/7  
>> through
>> > today, so it seems to consistently fail.
>> >
>> > -Nathan
>> >
>> > On 3/11/07, Geir Magnusson Jr. <geir@pobox.com> wrote:
>> > > Heh - did we have some problem w/ DST?
>> > >
>> > > geir
>> > >
>> > > On Mar 11, 2007, at 3:10 PM, Nathan Beyer wrote:
>> > >
>> > > > I'm seeing a consistent failure for this unit test on WinXP and
>> > > > Win2000 on the IBM VM. Should this test be excluded or at  
>> least the
>> > > > method disabled?
>> > > >
>> > > > test_getI     Failure expected:<346> but was:<345>
>> > > >
>> > > > -Nathan
>> > >
>> > >
>> >
>>
>>
>> --
>> Tony Wu
>> China Software Development Lab, IBM
>>


Mime
View raw message