diff options
author | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
---|---|---|
committer | wisberg <wisberg> | 2002-12-16 18:51:06 +0000 |
commit | 144143c2970a1e874d74cdbd0f8c622d4282a3c3 (patch) | |
tree | b12383d3d9e76c7e1f25f7fbec83051ef17f81fb /tests/new/PR347.java | |
parent | fafae443719b26159ab2d7dac1c9b46b5e00b671 (diff) | |
download | aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.tar.gz aspectj-144143c2970a1e874d74cdbd0f8c622d4282a3c3.zip |
initial version
Diffstat (limited to 'tests/new/PR347.java')
-rw-r--r-- | tests/new/PR347.java | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/new/PR347.java b/tests/new/PR347.java new file mode 100644 index 000000000..e7479938f --- /dev/null +++ b/tests/new/PR347.java @@ -0,0 +1,37 @@ +import org.aspectj.testing.*; + +public class PR347 { + public static void main(String[] args) { + new PR347().realMain(args); + } + public void realMain(String[] args) { + new A().i(); + new B().j(); + Tester.checkAllEvents(); + } + static { + Tester.expectEventsInString("Ai,A.i,Bj,B.j"); + } +} +interface I { public void i(); } +interface J { public void j(); } + +class A {} +class B {} + +aspect Aspect1 { + A +implements I; + B +implements J; +} + +aspect Aspect2 { + pointcut Ai(): receptions(void i()) && instanceof(A); + pointcut Bj(): receptions(void j()) && instanceof(B); + before(): Ai() { Tester.event("Ai"); } + before(): Bj() { Tester.event("Bj"); } +} + +aspect Aspect3 { + public void A.i() { Tester.event("A.i"); } + public void B.j() { Tester.event("B.j"); } +} |