summaryrefslogtreecommitdiffstats
path: root/tests/src
diff options
context:
space:
mode:
authoraclement <aclement>2004-12-08 14:34:33 +0000
committeraclement <aclement>2004-12-08 14:34:33 +0000
commitae085e2a79e3d8a71b03f422db8292d1007e04c1 (patch)
tree5a27c8f7dc4d95f9359b9c2371839319c65769ca /tests/src
parent6e6d34c79638763ab180578dd169147fda5011cc (diff)
downloadaspectj-ae085e2a79e3d8a71b03f422db8292d1007e04c1.tar.gz
aspectj-ae085e2a79e3d8a71b03f422db8292d1007e04c1.zip
Annotation matching.
Diffstat (limited to 'tests/src')
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/AllTestsJava5_binaryWeaving.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcuts.java42
2 files changed, 24 insertions, 19 deletions
diff --git a/tests/src/org/aspectj/systemtest/ajc150/AllTestsJava5_binaryWeaving.java b/tests/src/org/aspectj/systemtest/ajc150/AllTestsJava5_binaryWeaving.java
index ec734bd87..f03ceef4f 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/AllTestsJava5_binaryWeaving.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/AllTestsJava5_binaryWeaving.java
@@ -29,6 +29,7 @@ public class AllTestsJava5_binaryWeaving {
suite.addTestSuite(CovarianceTests.class);
suite.addTestSuite(Enums.class);
suite.addTestSuite(Annotations.class);
+ suite.addTestSuite(AnnotationPointcuts.class);
suite.addTestSuite(Varargs.class);
//$JUnit-END$
return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcuts.java b/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcuts.java
index dba69c367..58b41528e 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcuts.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/AnnotationPointcuts.java
@@ -27,24 +27,28 @@ public class AnnotationPointcuts extends TestUtils {
}
// before(): call(@SimpleAnnotation * *(..)) { }
-// public void test001_usingAnnotationsInPointcuts() {
-// CompilationResult cR = binaryWeave("testcode.jar","AnnotationAspect02.aj",0,0);
-// System.err.println(cR.getStandardError());
-// System.err.println(cR.getErrorMessages());
-// System.err.println(cR.getInfoMessages());
+ public void test001_usingAnnotationsInPointcuts() {
+ CompilationResult cR = binaryWeave("testcode.jar","AnnotationAspect02.aj",0,0);
+ System.err.println(cR.getStandardError());
+ System.err.println(cR.getErrorMessages());
+ System.err.println(cR.getInfoMessages());
+ verifyWeavingMessagesOutput(cR,new String[]{
+"weaveinfo Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)",
+"weaveinfo Type 'AnnotatedType' (AnnotatedType.java:3) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:2)",
+"weaveinfo Type 'AnnotatedType' (AnnotatedType.java:4) advised by before advice from 'AnnotationAspect02' (AnnotationAspect02.aj:4)"});
+
+// assertTrue("Expected three message about ITDs not allowed on Annotations but got: #"+
+// cR.getErrorMessages().size()+": \n"+cR.getErrorMessages(),
+// cR.getErrorMessages().size()==3);
+// IMessage msg1_ctor = (IMessage)cR.getErrorMessages().get(0);
+// IMessage msg2_method = (IMessage)cR.getErrorMessages().get(1);
+// IMessage msg3_field = (IMessage)cR.getErrorMessages().get(2);
+// assertTrue("Expected message about ITDCs on annotations not allowed, but got: \n"+msg1_ctor,
+// msg1_ctor.toString().indexOf("can't make inter-type constructor declarations")!=-1);
+// assertTrue("Expected message about ITDMs on annotations not allowed, but got: \n"+msg2_method,
+// msg2_method.toString().indexOf("can't make inter-type method declarations")!=-1);
+// assertTrue("Expected message about ITDFs on annotations not allowed, but got: \n"+msg3_field,
+// msg3_field.toString().indexOf("can't make inter-type field declarations")!=-1);
// verifyWeavingMessagesOutput(cR,new String[]{});
-//// assertTrue("Expected three message about ITDs not allowed on Annotations but got: #"+
-//// cR.getErrorMessages().size()+": \n"+cR.getErrorMessages(),
-//// cR.getErrorMessages().size()==3);
-//// IMessage msg1_ctor = (IMessage)cR.getErrorMessages().get(0);
-//// IMessage msg2_method = (IMessage)cR.getErrorMessages().get(1);
-//// IMessage msg3_field = (IMessage)cR.getErrorMessages().get(2);
-//// assertTrue("Expected message about ITDCs on annotations not allowed, but got: \n"+msg1_ctor,
-//// msg1_ctor.toString().indexOf("can't make inter-type constructor declarations")!=-1);
-//// assertTrue("Expected message about ITDMs on annotations not allowed, but got: \n"+msg2_method,
-//// msg2_method.toString().indexOf("can't make inter-type method declarations")!=-1);
-//// assertTrue("Expected message about ITDFs on annotations not allowed, but got: \n"+msg3_field,
-//// msg3_field.toString().indexOf("can't make inter-type field declarations")!=-1);
-//// verifyWeavingMessagesOutput(cR,new String[]{});
-// }
+ }
} \ No newline at end of file