harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alexey A. Ivanov (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-484) Bugs in org.apache.harmony.text.tests.java.text.DecimalFormatTest
Date Mon, 14 Aug 2006 11:58:17 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-484?page=comments#action_12427864 ] 
Alexey A. Ivanov commented on HARMONY-484:

Richard, George,

I've tried to analize _Uncertain_Test and _HarmonyIncorrect_Test tests. Here are my results.

1.  _Uncertain_Test
a) For pattern "#00.0##E0", it seems the RI behaves correctly and it's a Harmony bug since
the pattern sets minimal fractional digits to 1. I mean, the numbers should be formatted as
10.0E-3, 12.0E-3, 12.0E0. (I.e. ".0" is to be included in the resulting string.)

b) For pattern "#.0E0", I think the correct outcome is:
12.0   --> .1E2
123.0  --> .1E3
1234.0 --> .1E4

On the other hand, the pattern "#.E0" might be invalid because the pattern productions require
at least one integer digit, see Integer, MinimumInteger productions. Or am I wrong? (Maybe
there's an error in the productions.)

2. _HarmonyIncorrect_Test
I incline to consider the RI behavior is correct rather than the Harmony one.

There may be other ambiguous patterns, e.g. "#E0" (12 formats as ".1E1" in the RI, "1.2E1"
in Harmony).

Maybe it's worth to raise a discussion on the mailing list.

> Bugs in org.apache.harmony.text.tests.java.text.DecimalFormatTest
> -----------------------------------------------------------------
>                 Key: HARMONY-484
>                 URL: http://issues.apache.org/jira/browse/HARMONY-484
>             Project: Harmony
>          Issue Type: Bug
>          Components: Classlib
>            Reporter: Richard Liang
>         Assigned To: George Harley
>            Priority: Minor
>         Attachments: DecimalFormat_HarmonyIncorrect_Test.java, DecimalFormat_Uncertain_Test.java,
text.make.diff, text.src.diff
> Hello,
> There are some bugs in this test. I will attache the patch soon. Thanks a lot. 
> Best regards,
> Richard

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


View raw message