diff options
Diffstat (limited to 'tests/new/introductionPackage/one/TestAspect.java')
-rw-r--r-- | tests/new/introductionPackage/one/TestAspect.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/new/introductionPackage/one/TestAspect.java b/tests/new/introductionPackage/one/TestAspect.java new file mode 100644 index 000000000..11e4188b3 --- /dev/null +++ b/tests/new/introductionPackage/one/TestAspect.java @@ -0,0 +1,28 @@ +package one; + +import org.aspectj.testing.*; +public aspect TestAspect { + public static void main(String[] args) { + C me = new C(); + me.foo(); + Tester.checkAllEvents(); + } + static { + Tester.expectEvent("execution(void one.C.publicMethod())"); + Tester.expectEvent("execution(void one.C.protectedMethod())"); + Tester.expectEvent("execution(void one.C.defaultMethod())"); + Tester.expectEvent("get(int one.C.protectedInt)"); + Tester.expectEvent("get(int one.C.publicInt)"); + Tester.expectEvent("get(int one.C.defaultInt)"); + + // XXX added - correct? + Tester.expectEvent("execution(void one.C.foo())"); + Tester.expectEvent("execution(void one.C.protectedMethod())"); + } + + before () : execution(* C.*(..)) || get(int C.*) + { + Tester.event("" + thisJoinPointStaticPart); + //System.out.println("" + thisJoinPointStaticPart); + } +} |