From: acolyer Date: Fri, 18 Aug 2006 15:23:33 +0000 (+0000) Subject: tests for pr153572 X-Git-Tag: V_1_5_2a~2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=fd3a8eca2517b4a7ab437c00e2c81a3cdefeeb3a;p=aspectj.git tests for pr153572 --- 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 @@ + + + + + + + + + + \ No newline at end of file