]> source.dussan.org Git - aspectj.git/commitdiff
public constructor, better message reporting on failure
authorwisberg <wisberg>
Wed, 18 Dec 2002 17:04:12 +0000 (17:04 +0000)
committerwisberg <wisberg>
Wed, 18 Dec 2002 17:04:12 +0000 (17:04 +0000)
taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java

index d56f399437a08b7e03bb49a9ba6c5a48bd312aaf..b6ed3c9eb819a496248239e3203ca77eeb7bc5cd 100644 (file)
@@ -118,7 +118,7 @@ public class AjcTask extends MatchingTask {
     private boolean verbose;
     private boolean failonerror;
     
-    AjcTask() {
+    public AjcTask() {
        reset();
     }
 
index 035c0546a0b4369ff499b5980b19bf0fa6e83b75..7f7acfe797de5ba8fe9ce80afb0b16a5ddc677df 100644 (file)
@@ -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);
+               }
             }
         }
     }