diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/Pr114054.aj | 30 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 5 |
3 files changed, 39 insertions, 0 deletions
diff --git a/tests/bugs150/Pr114054.aj b/tests/bugs150/Pr114054.aj new file mode 100644 index 000000000..3f776df43 --- /dev/null +++ b/tests/bugs150/Pr114054.aj @@ -0,0 +1,30 @@ +public class Pr114054 { + public static boolean passed; + public static void main(String[] args) { + SampleSeries me = new SampleSeries(); + me.okSeries(); + me.open(); + me.close(); + if (!passed) { + throw new Error("failed to advise..."); + } + } + static class SampleSeries { + void open() {} + void close() {} + void okSeries() {open(); close();} + } + static aspect AAAA + // comment this out, and !call(...) works + pertarget(tracked()) + { + protected final pointcut tracked() : + call(void SampleSeries.*()) + // comment this out, and pertarget works... + && !call(void SampleSeries.*Series()) + ; + before() : tracked() { + Pr114054.passed = true; + } + } +}
\ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index be703cb03..41960b5ae 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -739,6 +739,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("returning(Object) binding"); } + public void testPerTargetAndNegation() { + runTest("pertarget and negated pointcut"); + } + /* * Load-time weaving bugs */ diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 5b072abf7..19a8c0f2f 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -37,6 +37,11 @@ </run> </ajc-test> + <ajc-test dir="bugs150" pr="114054" title="pertarget and negated pointcut"> + <compile files="Pr114054.aj" options=""/> + <run class="Pr114054"/> + </ajc-test> + <ajc-test dir="bugs150" pr="104220" title="adviceexecution join point toString forms"> <compile files="Pr104220.aj"/> <run class="Pr104220"> |