You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by gs...@apache.org on 2008/11/18 11:58:48 UTC

svn commit: r718551 - in /ant/antlibs/antunit/trunk: changes.xml src/main/org/apache/ant/antunit/AssertionFailedException.java src/main/org/apache/ant/antunit/ExpectFailureTask.java

Author: gscokart
Date: Tue Nov 18 02:58:47 2008
New Revision: 718551

URL: http://svn.apache.org/viewvc?rev=718551&view=rev
Log:
expectfailure report the original build exception chained when failing

Modified:
    ant/antlibs/antunit/trunk/changes.xml
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ExpectFailureTask.java

Modified: ant/antlibs/antunit/trunk/changes.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/changes.xml?rev=718551&r1=718550&r2=718551&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/changes.xml (original)
+++ ant/antlibs/antunit/trunk/changes.xml Tue Nov 18 02:58:47 2008
@@ -37,6 +37,12 @@
     <title>Apache AntUnit</title>
   </properties>
 
+  <release version="1.2" date="not-released">
+    <action type="update">
+      expectfailure report the original build exception chained when failing
+    </action>
+  </release>
+  
   <release version="1.1" date="2008-09-26">
     <action type="fix" issue="42745">
       assertFileExists example wrong, should use @file instead of @name

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java?rev=718551&r1=718550&r2=718551&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java Tue Nov 18 02:58:47 2008
@@ -38,4 +38,8 @@
     public AssertionFailedException(String message, Location loc) {
         super(message, loc);
     }
+
+    public AssertionFailedException(String message, BuildException e) {
+        super(message , e);
+    }
 }

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ExpectFailureTask.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ExpectFailureTask.java?rev=718551&r1=718550&r2=718551&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ExpectFailureTask.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/ExpectFailureTask.java Tue Nov 18 02:58:47 2008
@@ -66,9 +66,9 @@
                                     + "with message '"
                                     + expectedMessage
                                     + "' but was '"
-                                    + caughtMessage + "'");
+                                    + caughtMessage + "'" , e);
                 } else {
-                    throw new AssertionFailedException(message);
+                    throw new AssertionFailedException(message, e);
                 }
             }
         }