Harmony
  1. Harmony
  2. HARMONY-4387

[buildtest][func] DecimalFormatTest text test is incorrect

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: build - test - ci
    • Labels:
      None

      Description

      The test functional/org/apache/harmony/test/func/api/java/text/DecimalFormat/DecimalFormatTest.xml fails with the following output.

      22:55:46| DecimalFormat.format(double) returns incorrect value
      Expected:'B@C'@DH'AED'BDG'HFH'BH?'
      Returned:'B@C'@DH'AED'BDG'HFH'C??'

      The problem here that the the test expects the wrong value to be returned by DecimalFormat.format(double). The right one is 'B@C'@DH'AED'BDG'HFH'C??'

      The point is that RI has a bug in Double.toString(double) implementation. Thus for the double which is exploited by the test, 3.141592653589794E17 RI implementation of this method returns 3.1415926535897939E17 while Harmony returns 3.141592653589794E17. The latter is correct string.

      Current test expects the same value as returned by RI.

        Activity

        Roman S. Bushmanov created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Roman S. Bushmanov
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:

              Development