https://issues.apache.org/bugzilla/show_bug.cgi?id=47486

           Summary: junit integration: JUnitTestRunner converts a
                    comparisonFailure to an error
           Product: Ant
           Version: 1.7.1
          Platform: PC
        OS/Version: Windows Vista
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Optional Tasks
        AssignedTo: [email protected]
        ReportedBy: [email protected]


Detected with ant 1.7.1 and junit 4.6.

Running an unit test in eclipse ide which compares two strings results in a
failure of type comparisonFailure. That's OK.

Running the same test from ant script results in an error. That's not OK.

The error results from class JUnitTestRunner in Method
findJUnit4FailureErrorCount: The failure of type ComparisonFailure (which is a
subclass from AssertionFailedError) is not detected, therefor it is counted for
an error.

Source:
            if (t instanceof AssertionFailedError
                || t.getClass().getName().equals("java.lang.AssertionError")) {
                failures++;
            } else {
                errors++;
            }

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Reply via email to