Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8022094

BigDecimal/CompareToTests and BigInteger/CompareToTests are incorrect

    XMLWordPrintable

Details

    • b103
    • Verified

    Description

      There are several problems with these tests:

      1) BigInteger/CompareToTests is identical to BigDecimal/CompareToTests;
      2) Failures are not detected: errors are printed but the test does not fail;
      3) Some tests have incorrect expectations.

      With respect to #3 for example, it is assumed that if a < b then b < -a which does not in fact obtain for some of the compared values, e.g., a = Long.MIN_VALUE + 1 and b = Long.MAX_VALUE.

      Attachments

        Activity

          People

            bpb Brian Burkhalter
            bpb Brian Burkhalter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: