diff options
author | acolyer <acolyer> | 2005-09-06 10:58:36 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-06 10:58:36 +0000 |
commit | def2f307c6579a5992191b9364d4c74364baef4b (patch) | |
tree | 02fb90a87fef9f8c108167b943072a4f396432bd /tests | |
parent | ee6a87405375a518c4e7cd73c8ce856145de7c1d (diff) | |
download | aspectj-def2f307c6579a5992191b9364d4c74364baef4b.tar.gz aspectj-def2f307c6579a5992191b9364d4c74364baef4b.zip |
tests for pr108818, private pointcuts overridden inadvertantly
Diffstat (limited to 'tests')
-rw-r--r-- | tests/bugs150/PrivatePointcutOverriding.aj | 23 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 | ||||
-rw-r--r-- | tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 7 |
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/bugs150/PrivatePointcutOverriding.aj b/tests/bugs150/PrivatePointcutOverriding.aj new file mode 100644 index 000000000..a5b298d8c --- /dev/null +++ b/tests/bugs150/PrivatePointcutOverriding.aj @@ -0,0 +1,23 @@ +abstract aspect SuperAspect { + + private pointcut matchedJP() : execution(* foo(..)); + + declare warning : matchedJP() : "matched join point from super advice"; + +} + +public aspect PrivatePointcutOverriding extends SuperAspect { + + private pointcut matchedJP() : execution(* bar(..)); + + declare warning : matchedJP() : "matched join point from sub advice"; + +} + +class C { + + void foo() {} + + void bar() {} + +}
\ 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 d2ca4d9cf..79754f8bf 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -390,6 +390,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("final itd methods on interfaces"); } + public void testPrivatePointcutOverriding() { + runTest("can't override private pointcut in abstract aspect"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index 27df1824a..2b84361cd 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -494,6 +494,13 @@ </compile> </ajc-test> + <ajc-test dir="bugs150" pr="108818" title="can't override private pointcut in abstract aspect"> + <compile files="PrivatePointcutOverriding.aj"> + <message kind="warning" line="19" text="matched join point from super advice"/> + <message kind="warning" line="21" text="matched join point from sub advice"/> + </compile> + </ajc-test> + <!-- ============================================================================ --> <!-- ============================================================================ --> |