From: wisberg Date: Wed, 18 Dec 2002 17:04:12 +0000 (+0000) Subject: public constructor, better message reporting on failure X-Git-Tag: V_1_1_b2~27 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=49c53178fe1d89b736d9c23331f0164b794e1f60;p=aspectj.git public constructor, better message reporting on failure --- 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); + } } } }