harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Harley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HARMONY-484) Bugs in org.apache.harmony.text.tests.java.text.DecimalFormatTest
Date Tue, 23 May 2006 14:45:30 GMT
    [ http://issues.apache.org/jira/browse/HARMONY-484?page=comments#action_12412943 ] 

George Harley commented on HARMONY-484:

Hi Paulex, 

After applying your changes locally all of the tests pass against Harmony but - as you mention
in the code comments - there are a small number of failures against the RI. However, just
a cursory look at one of the failures has me wondering if it really does fail on the RI because
of a bug in the RI. For instance, here is a snippet from test method test_formatDLjava_lang_StringBufferLjava_text_FieldPosition()

        df = new DecimalFormat("##0.0E0");
        assertEquals("##0.0E0: -0.0", "-0.0E0", df.format(-0.0));
        assertEquals("##0.0E0: 0.0", "0.0E0", df.format(0.0));
        assertEquals("##0.0E0: 1.0", "1.0E0", df.format(1.0));
        assertEquals("##0.0E0: 12.0", "12E0", df.format(12.0));
        // The following test case fails on RI .
        // Reason:It should be a bug of RI.The number of significant digits
        // in the mantissa is the sum of the minimum integer and maximum
        // fraction digits, and is unaffected by the maximum integer digits.
        assertEquals("##0.0E0: 123.0", "120E0", df.format(123.0)); 

I am not an expert on java.text.DecimalFormat but I find it difficult to accept that the correct
outcome of formatting 123.0 with the given DecimalFormat object is "120E0" (what Harmony returns)
and not "123E0" (what the RI returns). 

What do you think ?

Best regards, 

> Bugs in org.apache.harmony.text.tests.java.text.DecimalFormatTest
> -----------------------------------------------------------------
>          Key: HARMONY-484
>          URL: http://issues.apache.org/jira/browse/HARMONY-484
>      Project: Harmony
>         Type: Bug

>   Components: Classlib
>     Reporter: Richard Liang
>     Assignee: George Harley
>     Priority: Minor
>  Attachments: 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:
For more information on JIRA, see:

View raw message