aboutsummaryrefslogtreecommitdiffstats
path: root/ajde/testsrc
diff options
context:
space:
mode:
authoraclement <aclement>2005-05-04 09:22:43 +0000
committeraclement <aclement>2005-05-04 09:22:43 +0000
commitabc9a58ac59f0ee427039e26cb44952cbef5e24b (patch)
tree8693a41b3f3bfe1268ffd8384a88ef57d8356d4c /ajde/testsrc
parent92a416462cb5a21b595c05861030dc591359945f (diff)
downloadaspectj-abc9a58ac59f0ee427039e26cb44952cbef5e24b.tar.gz
aspectj-abc9a58ac59f0ee427039e26cb44952cbef5e24b.zip
Impl of enhancement 92906 from Andrew Huff. -showWeaveInfo for declare annotation
Diffstat (limited to 'ajde/testsrc')
-rw-r--r--ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java26
1 files changed, 24 insertions, 2 deletions
diff --git a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
index e8da5e1ad..a4add872f 100644
--- a/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
+++ b/ajde/testsrc/org/aspectj/ajde/ShowWeaveMessagesTestCase.java
@@ -95,8 +95,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
if (rogueSymFile.exists()) rogueSymFile.delete();
}
-
-
+
/**
* Weave all the possible kinds of advice and verify the messages that come out.
@@ -158,6 +157,28 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
verifyWeavingMessages("declare.soft",true);
}
+ /**
+ * Weave 'declare @type, @constructor, @method and @field' and check the weave messages that come out.
+ */
+ public void testWeaveMessagesDeclareAnnotation() {
+ 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);
+ }
+
+ /**
+ * Weave 'declare @type, @constructor, @method and @field' and check the weave messages don't come out without the -showWeaveInfo arg.
+ */
+ 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);
+ }
+
// BINARY WEAVING TESTS
@@ -328,6 +349,7 @@ public class ShowWeaveMessagesTestCase extends AjdeTestCase {
List l = ideManager.getCompilationSourceLineTasks();
for (Iterator iter = l.iterator(); iter.hasNext();) {
IMessage msg = ((NullIdeTaskListManager.SourceLineTask) iter.next()).message;
+ if (debugTests) System.out.println("Looking at ["+msg+"]");
if (msg.getKind().equals(IMessage.WEAVEINFO)) {
if (!fileContents.contains(msg.getMessage())) {
fail("Could not find message '"+msg.getMessage()+"' in the expected results\n"+