harmony-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ivanov, Alexey A" <alexey.a.iva...@intel.com>
Subject RE: [continuum] BUILD FAILURE: Classlib/win.ia32 Build/Test
Date Thu, 20 Jul 2006 11:02:24 GMT
Hi all.

>BTW, my default locale is Russian

That's the reason. DecimalFormatTest is locale-dependent, but the test
logic doesn't take it into account. In Russian locale, comma is used as
decimal separator but not dot. And it is the reason why some tests fail.

I see two ways to resolve the problem:
1. Make tests locale-independent by explicitly specifying
DecimalFormatSymbols.
2. Fetch these symbols from the DecimalFormat object, and modify the
expected values using these data.

I prefer the first approach since this ensures we test the underlying
logic. [1]

I can prepare patch if nobody objects.


As for ChoiceFormatTest failure, there seems to be a bug in
ChoiceFormatter which can't parse negative numbers.


[1]
http://mail-archives.apache.org/mod_mbox/incubator-harmony-dev/200607.mb
ox/%3c44BDF608.60906@gmail.com%3e

--
Alexey A. Ivanov
Intel Middleware Product Division


>-----Original Message-----
>From: Alexei Zakharov [mailto:alexei.zakharov@gmail.com]
>Sent: Tuesday, July 18, 2006 4:36 PM
>To: harmony-dev@incubator.apache.org
>Subject: Re: [continuum] BUILD FAILURE: Classlib/win.ia32 Build/Test
>
>BTW, my default locale is Russian
>
>2006/7/18, Alexei Zakharov <alexei.zakharov@gmail.com>:
>> Sure,
>>
>> DecimalFormatTest:
>> ================
>> Testcase: test_parseLjava_lang_String_Ljava_text_ParsePosition took 0
sec
>> FAILED
>> null
>> junit.framework.AssertionFailedError
>> at
>org.apache.harmony.text.tests.java.text.DecimalFormatTest.test_parseLja
va_l
>ang_String_Ljava_text_ParsePosition(DecimalFormatTest.java:66)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>> Testcase: test_setDecimalSeparatorAlwaysShownZ took 0 sec
>> FAILED
>> Wrong set result expected:<....> but was:<...,>
>> junit.framework.ComparisonFailure: Wrong set result expected:<....>
>> but was:<...,>
>> at
>org.apache.harmony.text.tests.java.text.DecimalFormatTest.test_setDecim
alSe
>paratorAlwaysShownZ(DecimalFormatTest.java:1361)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>> Testcase: test_setMaximumFractionDigitsI took 0 sec
>> FAILED
>> Wrong maximum expected:<.......> but was:<...,...>
>> junit.framework.ComparisonFailure: Wrong maximum expected:<.......>
>> but was:<...,...>
>> at
>org.apache.harmony.text.tests.java.text.DecimalFormatTest.test_setMaxim
umFr
>actionDigitsI(DecimalFormatTest.java:1410)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>> Testcase: test_setMinimumFractionDigitsI took 0,016 sec
>> FAILED
>> Wrong minimum expected:<.......> but was:<...,...>
>> junit.framework.ComparisonFailure: Wrong minimum expected:<.......>
>> but was:<...,...>
>> at
>org.apache.harmony.text.tests.java.text.DecimalFormatTest.test_setMinim
umFr
>actionDigitsI(DecimalFormatTest.java:1436)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>> Testcase: test_setMinimumIntegerDigitsI took 0 sec
>> FAILED
>> Incorrect integer expected:<.......> but was:<...,...>
>> junit.framework.ComparisonFailure: Incorrect integer
>> expected:<.......> but was:<...,...>
>> at
>org.apache.harmony.text.tests.java.text.DecimalFormatTest.test_setMinim
umIn
>tegerDigitsI(DecimalFormatTest.java:1452)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>>
>> ChoiceFormatTest:
>> ===============
>> Testcase: test_toPattern took 0,016 sec
>> Caused an ERROR
>> null
>> java.lang.IllegalArgumentException
>> at java.text.ChoiceFormat.applyPattern(ChoiceFormat.java:126)
>> at java.text.ChoiceFormat.<init>(ChoiceFormat.java:65)
>> at
>org.apache.harmony.text.tests.java.text.ChoiceFormatTest.test_toPattern
(Cho
>iceFormatTest.java:421)
>> at
java.lang.reflect.AccessibleObject.invokeV(AccessibleObject.java:205)
>>
>>
>> Does this make sense?
>>
>> Regards,
>>
>> 2006/7/18, Tim Ellison <t.p.ellison@gmail.com>:
>> > Can you send details (e.g. a walkback) from the failing tests?
>> >
>> > Thanks
>> > Tim
>> >
>> > Alexei Zakharov wrote:
>> > > Are you talking about HARMONY-910? I've applied it and
>> > > MessageFormatTest is ok now (thanks, Richard!) But
ChoiceFormatTest
>> > > and DecimalFormatTest continue failing.
>> > >
>> > > 2006/7/18, Geir Magnusson Jr <geir@pobox.com>:
>> > >> Read back to the [build] status thread.... I think that Richard
has
>the
>> > >> fix done...
>> > >>
>> > >> Alexei Zakharov wrote:
>> > >> > Nathan,
>> <SNIP>
>>
>> --
>> Alexei Zakharov,
>> Intel Middleware Product Division
>>
>
>
>--
>Alexei Zakharov,
>Intel Middleware Product Division
>
>---------------------------------------------------------------------
>Terms of use : http://incubator.apache.org/harmony/mailing.html
>To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
>For additional commands, e-mail: harmony-dev-help@incubator.apache.org

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: harmony-dev-unsubscribe@incubator.apache.org
For additional commands, e-mail: harmony-dev-help@incubator.apache.org


Mime
View raw message