diff options
author | Andy Clement <andrew.clement@gmail.com> | 2013-05-31 23:07:29 -0700 |
---|---|---|
committer | Andy Clement <andrew.clement@gmail.com> | 2013-05-31 23:07:29 -0700 |
commit | 31d8e259e5cd8b1b4810d69bbf4b9ea45ae4a4c8 (patch) | |
tree | 4a273bd73d75a264bbca01cdffbf7a3c9dc1fd57 /tests | |
parent | 6f4140ac7028b9074e694e4c0b9de8b05e4b048a (diff) | |
download | aspectj-31d8e259e5cd8b1b4810d69bbf4b9ea45ae4a4c8.tar.gz aspectj-31d8e259e5cd8b1b4810d69bbf4b9ea45ae4a4c8.zip |
Use class file attributes to find containing class
https://bugs.eclipse.org/bugs/show_bug.cgi?id=407494
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs173/pr407494/A.java | 16 | ||||
-rw-r--r-- | tests/bugs173/pr407494/A2.java | 17 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc173/Ajc173Tests.java | 8 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc173/ajc173.xml | 14 |
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs173/pr407494/A.java b/tests/bugs173/pr407494/A.java new file mode 100644 index 000000000..0c1a1f636 --- /dev/null +++ b/tests/bugs173/pr407494/A.java @@ -0,0 +1,16 @@ +package a.b.c; + +public class A { + class B { + } + class $C { + } +} +class A$$B$$C { +} + +aspect X { + before(): within(A+) && staticinitialization(*) { + + } +} diff --git a/tests/bugs173/pr407494/A2.java b/tests/bugs173/pr407494/A2.java new file mode 100644 index 000000000..de0640892 --- /dev/null +++ b/tests/bugs173/pr407494/A2.java @@ -0,0 +1,17 @@ +package a.b.c; + +public class A2 { + class B { + } + class $C { + class Inner {} + } +} +class A$$B$$C { +} + +aspect X { + before(): within(*$C+) && staticinitialization(*) { + + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc173/Ajc173Tests.java b/tests/src/org/aspectj/systemtest/ajc173/Ajc173Tests.java index 91f4b6760..de3437baf 100644 --- a/tests/src/org/aspectj/systemtest/ajc173/Ajc173Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc173/Ajc173Tests.java @@ -28,6 +28,14 @@ public class Ajc173Tests extends org.aspectj.testing.XMLBasedAjcTestCase { // test that class literals allowed runTest("class anno value 1"); } + + public void testInnerNames_407494() throws Exception { + runTest("inner names"); + } + + public void testInnerNames_407494_2() throws Exception { + runTest("inner names 2"); + } // public void testClassAnnoValue_405016() throws Exception { // runTest("class anno value"); diff --git a/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml b/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml index 0589f1aca..bcbfa7b96 100644 --- a/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml +++ b/tests/src/org/aspectj/systemtest/ajc173/ajc173.xml @@ -2,6 +2,20 @@ <suite> + <ajc-test dir="bugs173/pr407494" title="inner names"> + <compile files="A.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Join point 'staticinitialization(void a.b.c.A$B.<clinit>())' in Type 'a.b.c.A$B' (A.java:4) advised by before advice from 'a.b.c.X' (A.java:13)"/> + <message kind="weave" text="Join point 'staticinitialization(void a.b.c.A.<clinit>())' in Type 'a.b.c.A' (A.java:3) advised by before advice from 'a.b.c.X' (A.java:13)"/> + <message kind="weave" text="Join point 'staticinitialization(void a.b.c.A$$C.<clinit>())' in Type 'a.b.c.A$$C' (A.java:6) advised by before advice from 'a.b.c.X' (A.java:13)"/> + </compile> + </ajc-test> + + <ajc-test dir="bugs173/pr407494" title="inner names 2"> + <compile files="A2.java" options="-1.5 -showWeaveInfo"> + <message kind="weave" text="Join point 'staticinitialization(void a.b.c.A$$B$$C.<clinit>())' in Type 'a.b.c.A$$B$$C' (A2.java:10) advised by before advice from 'a.b.c.X' (A2.java:14)"/> + </compile> + </ajc-test> + <ajc-test dir="bugs173/pr405016/one" title="class anno value 1"> <compile files="Gimme.java Thingy.java" options="-1.5 -showWeaveInfo"> <message kind="weave" text="Extending interface set for type 'Thingy' (Thingy.java) to include 'java.io.Serializable' (Thingy.java)"/> |