Uploaded image for project: 'Commons Math'
  1. Commons Math
  2. MATH-292

TestUtils.assertRelativelyEquals() generates misleading error on failure

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0
    • 2.1
    • None

    Description

      TestUtils.assertRelativelyEquals() generates misleading error on failure.

      For example:

      TestUtils.assertRelativelyEquals(1.0, 0.10427661385154971, 1.0e-9)

      generates the error message:

      junit.framework.AssertionFailedError: expected:<0.0> but was:<0.8957233861484503>

      which is not very helpful.

      Attachments

        1. MATH-292.patch
          0.7 kB
          Sebb

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: