summaryrefslogtreecommitdiffstats
path: root/ajde/testsrc
diff options
context:
space:
mode:
authoraclement <aclement>2006-08-25 09:50:32 +0000
committeraclement <aclement>2006-08-25 09:50:32 +0000
commit409e613aacda8d3e5bee8eed3d2919340e0ff7cd (patch)
tree67a0b6a0cfd3e2f4e96c64f6fea7e38e38e88e91 /ajde/testsrc
parent04fa1dcce12934cc5cfe1e5e8b66523c10e93672 (diff)
downloadaspectj-409e613aacda8d3e5bee8eed3d2919340e0ff7cd.tar.gz
aspectj-409e613aacda8d3e5bee8eed3d2919340e0ff7cd.zip
141556#11 - reworked messagehandler with 'ignore' function! (wooo) - hope Matthew doesnt complain.
Diffstat (limited to 'ajde/testsrc')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java6
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java15
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java7
3 files changed, 8 insertions, 20 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
index 80cda993d..3d4937de6 100644
--- a/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
+++ b/ajde/testsrc/org/aspectj/ajde/BuildCancellingTest.java
@@ -74,7 +74,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstCompile() {
if (debugTests) System.out.println("\n\n\ntestCancelFirstCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("compiled:",1); // Force a cancel after the first compile occurs
@@ -105,7 +104,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelThirdCompile() {
if (debugTests) System.out.println("\n\n\ntestCancelThirdCompile: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("compiled:",3); // Force a cancel after the third compile occurs
@@ -135,7 +133,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstAspectWeave() {
if (debugTests) System.out.println("\n\n\ntestCancelFirstAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven aspect ",1); // Force a cancel after the first weave aspect occurs
@@ -163,7 +160,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelThirdAspectWeave() {
if (debugTests) System.out.println("\n\n\ntestCancelThirdAspectWeave: Building with LoadsaCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
// Force a cancel after the third weave occurs.
@@ -207,7 +203,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelFirstClassWeave() {
if (debugTests) System.out.println("testCancelFirstClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven class",1);
@@ -248,7 +243,6 @@ public class BuildCancellingTest extends AjdeTestCase {
public void testCancelSecondClassWeave() {
if (debugTests) System.out.println("testCancelSecondClassWeave: Building with EvenMoreCode.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(false);
BuildProgMon programmableBPM = new BuildProgMon();
programmableBPM.cancelOn("woven class",2);
diff --git a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
index d2e95da66..0153630c2 100644
--- a/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ReweavableTestCase.java
@@ -19,6 +19,7 @@ import java.util.List;
import java.util.Set;
import org.aspectj.ajde.internal.CompilerAdapter;
+import org.aspectj.bridge.IMessage;
import org.aspectj.util.FileUtil;
public class ReweavableTestCase extends AjdeTestCase {
@@ -77,7 +78,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testNonReweavableCompile() {
if (debugTests) System.out.println("testNonReweavableCompile: Building with NonReweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("NonReweavable1.lst").getAbsolutePath(),new BPM(),false);
assertFalse("Did not expect to find a message about the weaver operating in reweavable mode",
@@ -115,7 +116,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableCompile() {
if (debugTests) System.out.println("testReweavableCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -162,7 +163,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableCompressCompile() {
if (debugTests) System.out.println("testReweavableCompressCompile: Building with ReweavableCompress1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("ReweavableCompress1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -222,7 +223,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testReweavableSimpleCompile() {
if (debugTests) System.out.println("testReweavableSimpleCompile: Building with Reweavable1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -276,7 +277,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testForReweavableSimpleErrorCompile() {
if (debugTests) System.out.println("testForReweavableSimpleErrorCompile: Building with Reweavable2.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("Reweavable1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -332,7 +333,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testErrorScenario2Compile() {
if (debugTests) System.out.println("testErrorScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
@@ -364,7 +365,7 @@ public class ReweavableTestCase extends AjdeTestCase {
public void testWorkingScenario2Compile() {
if (debugTests) System.out.println("testWorkingScenario2: Building with TJP1.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
+ compilerAdapter.getMessageHandler().dontIgnore(IMessage.INFO);
compilerAdapter.compile((String) openFile("TJP1.lst").getAbsolutePath(),new BPM(),false);
assertTrue("Expected a message about operating in reweavable mode, but didn't get one",
diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
index 528654a9b..57a5fcaaf 100644
--- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
@@ -106,7 +106,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesAdvice() {
if (debugTests) System.out.println("testWeaveMessagesAdvice: Building with One.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("One.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("advice",true);
}
@@ -120,7 +119,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesITD() {
if (debugTests) System.out.println("\ntestWeaveMessagesITD: Building with Two.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Two.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("itd",true);
}
@@ -132,7 +130,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclare() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclare: Building with Three.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Three.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare1",true);
}
@@ -144,7 +141,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareExtends() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareExtends: Building with Four.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Four.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.extends",true);
}
@@ -155,7 +151,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareSoft() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareSoft: Building with Five.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Five.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.soft",true);
}
@@ -167,7 +162,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
if (!LangUtil.is15VMOrGreater()) return; // annotation classes won't be about pre 15
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Six.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Six.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.annotation",true);
}
@@ -178,7 +172,6 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
public void testWeaveMessagesDeclareAnnotationWeaveInfoOff() {
if (debugTests) System.out.println("\ntestWeaveMessagesDeclareAnnotation: Building with Seven.lst");
compilerAdapter = new CompilerAdapter();
- compilerAdapter.showInfoMessages(true);
compilerAdapter.compile((String) openFile("Seven.lst").getAbsolutePath(),new BPM(),false);
verifyWeavingMessages("declare.annotationNoWeaveInfo",true);
}