From 49c53178fe1d89b736d9c23331f0164b794e1f60 Mon Sep 17 00:00:00 2001 From: wisberg Date: Wed, 18 Dec 2002 17:04:12 +0000 Subject: [PATCH] public constructor, better message reporting on failure --- taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java | 2 +- .../org/aspectj/tools/ant/taskdefs/AjcTaskTest.java | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java index d56f39943..b6ed3c9eb 100644 --- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java +++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java @@ -118,7 +118,7 @@ public class AjcTask extends MatchingTask { private boolean verbose; private boolean failonerror; - AjcTask() { + public AjcTask() { reset(); } diff --git a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java index 035c0546a..7f7acfe79 100644 --- a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java +++ b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java @@ -244,7 +244,13 @@ public class AjcTaskTest extends TestCase { private void check(IMessageHolder holder, int num, IMessage.Kind kind) { if (num != IGNORE) { - assertEquals(num, holder.numMessages(kind, false)); + int actual = holder.numMessages(kind, false); + if (num != actual) { + if (actual > 0) { + MessageUtil.print(System.err, holder, "expected " + num + " got " + actual); + } + assertEquals(num, actual); + } } } } -- 2.39.5