summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs153/pr153572/Annotated.java4
-rw-r--r--tests/bugs153/pr153572/AnnotationMatcher.aj8
-rw-r--r--tests/bugs153/pr153572/Configurable.java6
-rw-r--r--tests/bugs153/pr153572/Main.java7
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc153/ajc153.xml14
6 files changed, 41 insertions, 1 deletions
diff --git a/tests/bugs153/pr153572/Annotated.java b/tests/bugs153/pr153572/Annotated.java
new file mode 100644
index 000000000..10a872b91
--- /dev/null
+++ b/tests/bugs153/pr153572/Annotated.java
@@ -0,0 +1,4 @@
+@Configurable
+public class Annotated {
+
+} \ No newline at end of file
diff --git a/tests/bugs153/pr153572/AnnotationMatcher.aj b/tests/bugs153/pr153572/AnnotationMatcher.aj
new file mode 100644
index 000000000..f7a7f4d10
--- /dev/null
+++ b/tests/bugs153/pr153572/AnnotationMatcher.aj
@@ -0,0 +1,8 @@
+public aspect AnnotationMatcher {
+
+ after() returning : initialization(*.new(..)) && @this(Configurable) {
+ System.out.println("annotated type initialized");
+ }
+
+
+} \ No newline at end of file
diff --git a/tests/bugs153/pr153572/Configurable.java b/tests/bugs153/pr153572/Configurable.java
new file mode 100644
index 000000000..be9014322
--- /dev/null
+++ b/tests/bugs153/pr153572/Configurable.java
@@ -0,0 +1,6 @@
+import java.lang.annotation.*;
+
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Configurable {
+
+} \ No newline at end of file
diff --git a/tests/bugs153/pr153572/Main.java b/tests/bugs153/pr153572/Main.java
new file mode 100644
index 000000000..e0dc601cd
--- /dev/null
+++ b/tests/bugs153/pr153572/Main.java
@@ -0,0 +1,7 @@
+public class Main {
+
+ public static void main(String[] args) {
+ new Annotated();
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
index e2d6256f2..b211e5cf3 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc153/Ajc153Tests.java
@@ -62,7 +62,8 @@ public class Ajc153Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
}
public void testMatchVolatileField_pr150671() {runTest("match volatile field");};
public void testDuplicateJVMTIAgents_pr151938() {runTest("Duplicate JVMTI agents");};
-
+ public void testLTWWorldWithAnnotationMatching_pr153572() { runTest("LTWWorld with annotation matching");}
+
/////////////////////////////////////////
public static Test suite() {
return XMLBasedAjcTestCase.loadSuite(Ajc153Tests.class);
diff --git a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
index 1951d4b3e..06cc9c371 100644
--- a/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
+++ b/tests/src/org/aspectj/systemtest/ajc153/ajc153.xml
@@ -291,4 +291,18 @@
<compile files="EMA.java" options="-1.5"/>
</ajc-test>
+ <ajc-test dir="bugs153/pr153572" title="LTWWorld with annotation matching">
+ <compile
+ files="Configurable.java, AnnotationMatcher.aj"
+ options="-1.5"
+ outjar="aspectlib.jar"
+ outxmlfile="META-INF/aop.xml"/>
+ <compile files="Configurable.java,Annotated.java,Main.java" options="-1.5" outjar="myapp.jar"/>
+ <run class="Main" ltw="">
+ <stdout>
+ <line text="annotated type initialized"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
</suite> \ No newline at end of file