harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tony Wu" <wuyue...@gmail.com>
Subject Re: [classlib] Bad test in GregorianCalendarTest?
Date Tue, 16 Jan 2007 16:56:21 GMT
I can not reproduce that, one-test passed on my winxp sp2 desktop on
r496749. I looked at the case test_rollIZ() and found no dependency to
other cases.

But at least the assertTrue should be replaced with assertEquals here.
And the error message is not reliable because method getTime() did not
cut the days when calendar converted from julian to gregorian.

On 1/16/07, Mark Hindess <mark.hindess@googlemail.com> wrote:
>
> I noticed while testing one of Tony's GregorianCalendar JIRA patches
> that while all tests, including the GregorianCalendarTest, pass if I run
> all the luni tests with:
>
>  ant -Dbuild.module=luni test
>
> if I run just the one test with:
>
>  ant -Dbuild.module=luni \
>      -Dtest.case=tests.api.java.util.GregorianCalendarTest test
>
> then it fails with:
>
>  junit.framework.AssertionFailedError:
>    Wrong date: Fri Jan 02 05:00:00 GMT 2004 at
>    tests.api.java.util.GregorianCalendarTest.test_rollIZ
>    (GregorianCalendarTest.java:548)
>
> It's not immediately obvious to me why this happens.  I think this is
> probably an undesirable feature of a test and that all tests should be
> independent.
>
> Regards,
>  Mark.
>
>
>


-- 
Tony Wu
China Software Development Lab, IBM

Mime
View raw message