Browse Source

Add in the addFailure method for later versions of JUnit

copied from PlainFormatter


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@269012 13f79535-47bb-0310-9956-ffa450edef68
master
Conor MacNeill 24 years ago
parent
commit
2fb97663f2
1 changed files with 15 additions and 4 deletions
  1. +15
    -4
      src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java

+ 15
- 4
src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java View File

@@ -198,12 +198,23 @@ public class BriefJUnitResultFormatter implements JUnitResultFormatter {
}

/**
* A test failed.
* Interface TestListener for JUnit <= 3.4.
*
* <p>A Test failed.
*/
public void addFailure(Test test, AssertionFailedError failure) {
formatError("\tFAILED", test, failure);
public void addFailure(Test test, Throwable t) {
formatError("\tFAILED", test, t);
}

/**
* Interface TestListener for JUnit &gt; 3.4.
*
* <p>A Test failed.
*/
public void addFailure(Test test, AssertionFailedError t) {
addFailure(test, (Throwable) t);
}

/**
* A test caused an error.
*/


Loading…
Cancel
Save