ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47486] New: junit integration: JUnitTestRunner converts a comparisonFailure to an error
Date Tue, 07 Jul 2009 08:47:19 GMT
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: notifications@ant.apache.org
        ReportedBy: peter.probst@parametrix.ch


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.

Mime
View raw message