From 2fb97663f2446b5bcbecf2bc75d7abe93a6409c5 Mon Sep 17 00:00:00 2001 From: Conor MacNeill Date: Sat, 5 May 2001 14:02:50 +0000 Subject: [PATCH] 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 --- .../junit/BriefJUnitResultFormatter.java | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java index 6065f7bca..5c9f84229 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/junit/BriefJUnitResultFormatter.java @@ -198,12 +198,23 @@ public class BriefJUnitResultFormatter implements JUnitResultFormatter { } /** - * A test failed. + * Interface TestListener for JUnit <= 3.4. + * + *

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 > 3.4. + * + *

A Test failed. + */ + public void addFailure(Test test, AssertionFailedError t) { + addFailure(test, (Throwable) t); + } + /** * A test caused an error. */