You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bu...@apache.org on 2008/05/18 17:18:21 UTC
DO NOT REPLY [Bug 45028] New: ant-junit treats ComparisonFailure as
Error
https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
Summary: ant-junit treats ComparisonFailure as Error
Product: Ant
Version: 1.7.0
Platform: PC
URL: http://xeraph.egloos.com
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: Optional Tasks
AssignedTo: notifications@ant.apache.org
ReportedBy: yang@xeraph.com
I tested under JDK 1.6.0_04, JUnit 4.4, Ant 1.7.0
I made a simple junit 4 assert:
assertEquals("t", "test");
I expected ant display the test results as below:
[junit] Tests run: 1, Failures: 1, Errors: 0
but I got:
[junit] Tests run: 1, Failures: 0, Errors: 1
then I add logging code to JUnitTestRunner.java for debugging.
(in src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTestRunner.java)
when string assertEquals fails, junit4 throws org.junit.ComparisonFailure
but ant-junit's JUnitTestRunner uses junit.framework.AssertionFailedError.
In order to correct problem, I had to fix wrapListener method.
In case of other assertEquals fails, junit4 throws java.lang.AssertionError,
so there's no problem at all. I got expected result as below:
assertEquals(1, 2);
[junit] Tests run: 1, Failures: 1, Errors: 0
only ComparisonFailure exception have the problem.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
DO NOT REPLY [Bug 45028] ant-junit treats ComparisonFailure as Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
URL|http://xeraph.egloos.com |
--- Comment #2 from Stefan Bodewig <bo...@apache.org> 2008-10-14 09:06:14 PST ---
I didn't think the URL was relevant to this bug report, sorry.
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
DO NOT REPLY [Bug 45028] ant-junit treats ComparisonFailure as Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |peter.probst@parametrix.ch
--- Comment #3 from Stefan Bodewig <bo...@apache.org> 2009-07-07 02:32:25 PST ---
*** Bug 47486 has been marked as a duplicate of this bug. ***
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
DO NOT REPLY [Bug 45028] ant-junit treats ComparisonFailure as Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |notifications@ant.apache.org
AssignedTo|notifications@ant.apache.org|bodewig@apache.org
Target Milestone|1.7.0 |1.8.0
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
You are the assignee for the bug.
DO NOT REPLY [Bug 45028] ant-junit treats ComparisonFailure as Error
Posted by bu...@apache.org.
https://issues.apache.org/bugzilla/show_bug.cgi?id=45028
Stefan Bodewig <bo...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |FIXED
--- Comment #1 from Stefan Bodewig <bo...@apache.org> 2008-10-14 09:05:37 PST ---
fixed with svn revision 704571
--
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.