summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2004-09-30 14:41:09 +0000
committeraclement <aclement>2004-09-30 14:41:09 +0000
commitf8a87f1bb5fb19f5eb2f85e8df32939bb88bb73e (patch)
treed773e9a6d9d7a01762b1edcc76c677584c21c123
parenta89962434e080f2cb939dd59726f1acd65b31d6a (diff)
downloadaspectj-f8a87f1bb5fb19f5eb2f85e8df32939bb88bb73e.tar.gz
aspectj-f8a87f1bb5fb19f5eb2f85e8df32939bb88bb73e.zip
Fix for Bugzilla Bug 74279
-showWeaveInfo option is not supported by iajc Ant task
-rw-r--r--taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java4
-rw-r--r--taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java15
2 files changed, 19 insertions, 0 deletions
diff --git a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
index 1cf3d11d3..f5321c87b 100644
--- a/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
+++ b/taskdefs/src/org/aspectj/tools/ant/taskdefs/AjcTask.java
@@ -462,6 +462,10 @@ public class AjcTask extends MatchingTask {
public void setXReweavable(boolean reweavable) {
cmd.addFlag("-Xreweavable",reweavable);
}
+
+ public void setShowWeaveInfo(boolean showweaveinfo) {
+ cmd.addFlag("-showWeaveInfo",showweaveinfo);
+ }
public void setNowarn(boolean nowarn) {
cmd.addFlag("-nowarn", nowarn);
diff --git a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
index 96618a708..25030c116 100644
--- a/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
+++ b/taskdefs/testsrc/org/aspectj/tools/ant/taskdefs/AjcTaskTest.java
@@ -414,6 +414,17 @@ public class AjcTaskTest extends TestCase {
task.setFailonerror(false);
runTest(task, NO_EXCEPTION, MessageHolderChecker.ONE_ERROR);
}
+
+ public void testShowWeaveInfo() {
+ AjcTask task = getTask("showweaveinfo.lst");
+ task.setShowWeaveInfo(true);
+ MessageHandler mh = new MessageHandler(false);
+ mh.dontIgnore(IMessage.WEAVEINFO);
+ MessageHolderChecker mhc = new MessageHolderChecker(0,0,0,0,MessageHolderChecker.IGNORE);
+ mhc.weaveinfos = 2; // Expect 2 weaving messages
+ runTest(task,NO_EXCEPTION,mhc);
+ mhc.weaveinfos = MessageHolderChecker.IGNORE;
+ }
public void testCompileWarningList() {
AjcTask task = getTask("compileWarning.lst");
@@ -634,8 +645,10 @@ public class AjcTaskTest extends TestCase {
/** one warning, any number of info messages */
static MessageHolderChecker ONE_WARNING =
new MessageHolderChecker(0, 0, 0, 1, IGNORE);
+
int aborts, fails, errors, warnings, infos;
+ int weaveinfos;
public MessageHolderChecker(
int aborts,
int fails,
@@ -647,6 +660,7 @@ public class AjcTaskTest extends TestCase {
this.errors = errors;
this.warnings = warnings;
this.infos = infos;
+ this.weaveinfos = IGNORE;
}
public boolean expectFail() {
@@ -661,6 +675,7 @@ public class AjcTaskTest extends TestCase {
check(holder, errors, IMessage.ERROR);
check(holder, warnings, IMessage.WARNING);
check(holder, infos, IMessage.INFO);
+ check(holder, weaveinfos, IMessage.WEAVEINFO);
failed = false;
} finally {
if (failed) {