aboutsummaryrefslogtreecommitdiffstats
path: root/taskdefs
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-04-30 02:05:00 +0000
committerwisberg <wisberg>2003-04-30 02:05:00 +0000
commita6f5de94db169038b4b74dbb9ac153748fb21cb4 (patch)
tree2d3802b8e9490866397a3daab5eab2d93ad87f88 /taskdefs
parentf6d57acb9814d2365ec6ddd9ff290f201c656247 (diff)
downloadaspectj-a6f5de94db169038b4b74dbb9ac153748fb21cb4.tar.gz
aspectj-a6f5de94db169038b4b74dbb9ac153748fb21cb4.zip
fixed two tests to expect addition abort message for usage,
and commented out one test because it does not add the file correctly (to a matching task)
Diffstat (limited to 'taskdefs')
-rw-r--r--taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java19
1 files changed, 11 insertions, 8 deletions
diff --git a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
index 87a91568b..9e6025c95 100644
--- a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
+++ b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
@@ -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);
}
}
}