summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2005-12-13 09:25:38 +0000
committeraclement <aclement>2005-12-13 09:25:38 +0000
commitae500c6ac89fef8b7bb6cf4bd2a9cf1ec16cdd6a (patch)
treedcb827bfd0bf4afa8e33544a020df0b08f6985c3 /tests
parent3eb0e5addb26cf4f8a9a66795581c01a60adce63 (diff)
downloadaspectj-ae500c6ac89fef8b7bb6cf4bd2a9cf1ec16cdd6a.tar.gz
aspectj-ae500c6ac89fef8b7bb6cf4bd2a9cf1ec16cdd6a.zip
test for 120521
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs150/pr120521/PerTargetSubaspectError.java18
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc150/ajc150.xml4
3 files changed, 23 insertions, 0 deletions
diff --git a/tests/bugs150/pr120521/PerTargetSubaspectError.java b/tests/bugs150/pr120521/PerTargetSubaspectError.java
new file mode 100644
index 000000000..0f2443dad
--- /dev/null
+++ b/tests/bugs150/pr120521/PerTargetSubaspectError.java
@@ -0,0 +1,18 @@
+package bugs;
+
+public class PerTargetSubaspectError {
+ public static void main(String[] args) {
+ C.run();
+ }
+ static class C {
+ static void run() {}
+ }
+ pointcut doit() : execution(void C.run());
+
+ // no error if not pertarget
+ static aspect CPT pertarget(pc()){
+ // no error if doit() defined in CPT
+ protected pointcut pc() : doit(); // unexpected CE
+ before() : doit() {} // no CE
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
index f00f601a9..dfc65f860 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java
@@ -41,6 +41,7 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
protected File getSpecFile() {
return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml");
}
+ //public void testNamedPointcutPertarget_pr120521() { runTest("named pointcut not resolved in pertarget pointcut");}
public void testDollarClasses_pr120474() { runTest("Dollar classes");}
public void testGenericPTW_pr119539_1() { runTest("generic pertypewithin aspect - 1");}
public void testGenericPTW_pr119539_2() { runTest("generic pertypewithin aspect - 2");}
diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
index ed4d8c155..790dca6f9 100644
--- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
+++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml
@@ -78,6 +78,10 @@
<compile files="ParameterizedDP.java,NodeImpl.java,INode.java" options="-1.5"/>
<run class="bugs.ParameterizedDP"/>
</ajc-test>
+
+ <ajc-test dir="bugs150/pr120521" pr="120521" title="named pointcut not resolved in pertarget pointcut">
+ <compile files="PerTargetSubaspectError.java"/>
+ </ajc-test>
<ajc-test dir="bugs150/pr119210" pr="119210" title="autoboxing around advice - 1">
<compile files="TestLib.java,ThreadAspectLib.java" options="-1.5"/>