]> source.dussan.org Git - aspectj.git/commitdiff
fixed two tests to expect addition abort message for usage,
authorwisberg <wisberg>
Wed, 30 Apr 2003 02:05:00 +0000 (02:05 +0000)
committerwisberg <wisberg>
Wed, 30 Apr 2003 02:05:00 +0000 (02:05 +0000)
and commented out one test because it does not add the file correctly (to a matching task)

taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java

index 87a91568bcaad4296da1b0c4496924509706bf5b..9e6025c952680c68a213900cd815c36a0ddaf29d 100644 (file)
@@ -131,18 +131,19 @@ public class AjcTaskTest extends TestCase {
 
     public void testNoSuchFileList() {
         AjcTask task = getTask("testdata/NoSuchFile.lst");
-        runTest(task, NO_EXCEPTION, IMessageHolderChecker.ONE_ERROR);
+        runTest(task, NO_EXCEPTION, IMessageHolderChecker.ONE_ERROR_ONE_ABORT);
     }
 
     // ---------------------------------------- sourcefile
-    public void testDefaultFile() {
-        AjcTask task = getTask("testdata/Default.java");
-        runTest(task, NO_EXCEPTION, IMessageHolderChecker.INFOS);
-    }
+    // XXX need to figure out how to specify files directly programmatically
+//    public void testDefaultFile() {
+//        AjcTask task = getTask("testdata/Default.java");
+//        runTest(task, NO_EXCEPTION, IMessageHolderChecker.INFOS);
+//    }
 
     public void testNoFile() {
         AjcTask task = getTask(NOFILE);
-        runTest(task, NO_EXCEPTION, IMessageHolderChecker.ONE_ERROR);
+        runTest(task, NO_EXCEPTION, IMessageHolderChecker.ONE_ERROR_ONE_ABORT);
     }
     
 // -------- comment-disabled tests
@@ -237,6 +238,8 @@ public class AjcTaskTest extends TestCase {
         /** one error, any number of info messages */
         static IMessageHolderChecker ONE_ERROR= 
             new IMessageHolderChecker(0,0,1,0,IGNORE);
+        static IMessageHolderChecker ONE_ERROR_ONE_ABORT = 
+            new IMessageHolderChecker(1,0,1,0,IGNORE);
         /** one warning, any number of info messages */
         static IMessageHolderChecker ONE_WARNING = 
             new IMessageHolderChecker(0,0,0,1,IGNORE);
@@ -270,9 +273,9 @@ public class AjcTaskTest extends TestCase {
                int actual = holder.numMessages(kind, false);
                if (num != actual) {
                        if (actual > 0) {
-                               MessageUtil.print(System.err, holder, "expected " + num + " got " + actual);
+                               MessageUtil.print(System.err, holder, kind + " expected " + num + " got " + actual);
                        }
-                       assertEquals(num, actual);
+                       assertEquals(kind.toString(), num, actual);
                }
             }
         }