You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jh...@apache.org on 2007/09/12 11:09:51 UTC

svn commit: r574855 - in /ant/antlibs/antunit/trunk/src: main/org/apache/ant/antunit/ main/org/apache/ant/antunit/listener/ tests/junit/org/apache/ant/antunit/

Author: jhm
Date: Wed Sep 12 02:09:50 2007
New Revision: 574855

URL: http://svn.apache.org/viewvc?rev=574855&view=rev
Log:
* Organize imports
* typos
* AntUnit: local "orig" was never read
* AntUnit: document "not read" local variable lc
* AssertionFailedException: add generated serialVersionUID

Modified:
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AssertionFailedException.java
    ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/listener/BaseAntUnitListener.java
    ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java?rev=574855&r1=574854&r2=574855&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/AntUnit.java Wed Sep 12 02:09:50 2007
@@ -33,9 +33,7 @@
 import org.apache.tools.ant.MagicNames;
 import org.apache.tools.ant.Project;
 import org.apache.tools.ant.ProjectHelper;
-import org.apache.tools.ant.Target;
 import org.apache.tools.ant.Task;
-import org.apache.tools.ant.taskdefs.LogOutputStream;
 import org.apache.tools.ant.types.PropertySet;
 import org.apache.tools.ant.types.ResourceCollection;
 import org.apache.tools.ant.types.resources.FileResource;
@@ -241,6 +239,7 @@
                         v.add(SETUP);
                     }
                     v.add(name);
+                    // create an register a logcapturer on the newProject
                     LogCapturer lc = new LogCapturer(newProject);
                     try {
                         fireStartTest(name);
@@ -248,11 +247,10 @@
                     } catch (AssertionFailedException e) {
                         fireFail(name, e);
                     } catch (BuildException e) {
-                        BuildException orig = e;
                         boolean failed = false;
 
                         // try to see whether the BuildException masks
-                        // an AssertionFailedException.  if so, treat
+                        // an AssertionFailedException. If so, treat
                         // it as failure instead of error.
                         Throwable t = e.getCause();
                         while (t != null && t instanceof BuildException) {

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=574855&r1=574854&r2=574855&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 Wed Sep 12 02:09:50 2007
@@ -28,6 +28,7 @@
  */
 public class AssertionFailedException extends BuildException {
 
+    private static final long serialVersionUID = -1193299712860263327L;
     public static final String DEFAULT_MESSAGE = "Assertion failed";
 
     public AssertionFailedException(String message) {

Modified: ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/listener/BaseAntUnitListener.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/listener/BaseAntUnitListener.java?rev=574855&r1=574854&r2=574855&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/listener/BaseAntUnitListener.java (original)
+++ ant/antlibs/antunit/trunk/src/main/org/apache/ant/antunit/listener/BaseAntUnitListener.java Wed Sep 12 02:09:50 2007
@@ -20,17 +20,14 @@
 
 package org.apache.ant.antunit.listener;
 
-import java.io.IOException;
 import java.io.File;
 import java.io.FileOutputStream;
+import java.io.IOException;
 import java.io.OutputStream;
-import java.io.PrintWriter;
-import java.io.StringWriter;
 import java.text.NumberFormat;
 
 import org.apache.ant.antunit.AntUnitListener;
 import org.apache.ant.antunit.AssertionFailedException;
-
 import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.Location;
 import org.apache.tools.ant.Project;

Modified: ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java
URL: http://svn.apache.org/viewvc/ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java?rev=574855&r1=574854&r2=574855&view=diff
==============================================================================
--- ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java (original)
+++ ant/antlibs/antunit/trunk/src/tests/junit/org/apache/ant/antunit/AssertTest.java Wed Sep 12 02:09:50 2007
@@ -19,7 +19,6 @@
  */
 package org.apache.ant.antunit;
 
-import org.apache.tools.ant.BuildException;
 import org.apache.tools.ant.BuildFileTest;
 
 public class AssertTest extends BuildFileTest {



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org