From fd3a8eca2517b4a7ab437c00e2c81a3cdefeeb3a Mon Sep 17 00:00:00 2001 From: acolyer Date: Fri, 18 Aug 2006 15:23:33 +0000 Subject: [PATCH] tests for pr153572 --- tests/bugs153/pr153572/Annotated.java | 4 ++++ tests/bugs153/pr153572/AnnotationMatcher.aj | 8 ++++++++ tests/bugs153/pr153572/Configurable.java | 6 ++++++ tests/bugs153/pr153572/Main.java | 7 +++++++ .../org/aspectj/systemtest/ajc153/Ajc153Tests.java | 3 ++- tests/src/org/aspectj/systemtest/ajc153/ajc153.xml | 14 ++++++++++++++ 6 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 tests/bugs153/pr153572/Annotated.java create mode 100644 tests/bugs153/pr153572/AnnotationMatcher.aj create mode 100644 tests/bugs153/pr153572/Configurable.java create mode 100644 tests/bugs153/pr153572/Main.java 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 -- 2.39.5