* Organize imports

* typos
* AntUnit: local "orig" was never read
* AntUnit: document "not read" local variable lc
* AssertionFailedException: add generated serialVersionUID

git-svn-id: https://svn.apache.org/repos/asf/ant/antlibs/antunit/trunk@574855 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jan Materne 2007-09-12 09:09:50 +00:00
parent 3473e654d9
commit 6542c9233b
4 changed files with 4 additions and 9 deletions

View File

@ -33,9 +33,7 @@ import org.apache.tools.ant.BuildListener;
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 @@ public class AntUnit extends Task {
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 @@ public class AntUnit extends Task {
} 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) {

View File

@ -28,6 +28,7 @@ import org.apache.tools.ant.Location;
*/
public class AssertionFailedException extends BuildException {
private static final long serialVersionUID = -1193299712860263327L;
public static final String DEFAULT_MESSAGE = "Assertion failed";
public AssertionFailedException(String message) {

View File

@ -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;

View File

@ -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 {