From 511e100a81fd864f2f989becfe1405f1be9bb3e0 Mon Sep 17 00:00:00 2001 From: aclement Date: Thu, 13 May 2010 17:21:53 +0000 Subject: [PATCH] overweaving and tjp --- tests/features167/overweaving/callsTJP/A.aj | 3 ++ tests/features167/overweaving/callsTJP/B.aj | 4 ++ .../overweaving/callsTJP/Class1.java | 5 ++ .../overweaving/callsTJP/Class2.java | 5 ++ .../features167/overweaving/callsTJP/aop.xml | 12 +++++ tests/features167/overweaving/getsetTJP/A.aj | 3 ++ tests/features167/overweaving/getsetTJP/B.aj | 3 ++ .../overweaving/getsetTJP/Class1.java | 6 +++ .../overweaving/getsetTJP/Class2.java | 6 +++ .../features167/overweaving/getsetTJP/aop.xml | 12 +++++ .../systemtest/ajc167/OverweavingTests.java | 8 ++++ .../aspectj/systemtest/ajc167/overweaving.xml | 47 ++++++++++++++++++- 12 files changed, 113 insertions(+), 1 deletion(-) create mode 100644 tests/features167/overweaving/callsTJP/A.aj create mode 100644 tests/features167/overweaving/callsTJP/B.aj create mode 100644 tests/features167/overweaving/callsTJP/Class1.java create mode 100644 tests/features167/overweaving/callsTJP/Class2.java create mode 100644 tests/features167/overweaving/callsTJP/aop.xml create mode 100644 tests/features167/overweaving/getsetTJP/A.aj create mode 100644 tests/features167/overweaving/getsetTJP/B.aj create mode 100644 tests/features167/overweaving/getsetTJP/Class1.java create mode 100644 tests/features167/overweaving/getsetTJP/Class2.java create mode 100644 tests/features167/overweaving/getsetTJP/aop.xml diff --git a/tests/features167/overweaving/callsTJP/A.aj b/tests/features167/overweaving/callsTJP/A.aj new file mode 100644 index 000000000..87bbabf6c --- /dev/null +++ b/tests/features167/overweaving/callsTJP/A.aj @@ -0,0 +1,3 @@ +public aspect A { + before(): !cflow(adviceexecution()) && call(* *(..)) {System.out.println("A:"+thisJoinPoint);} +} diff --git a/tests/features167/overweaving/callsTJP/B.aj b/tests/features167/overweaving/callsTJP/B.aj new file mode 100644 index 000000000..6c985367b --- /dev/null +++ b/tests/features167/overweaving/callsTJP/B.aj @@ -0,0 +1,4 @@ +public aspect B { + declare precedence: B,*; + before(): !cflow(adviceexecution()) && call(* *(..)) {System.out.println("B:"+thisJoinPoint);} +} diff --git a/tests/features167/overweaving/callsTJP/Class1.java b/tests/features167/overweaving/callsTJP/Class1.java new file mode 100644 index 000000000..c89605ca0 --- /dev/null +++ b/tests/features167/overweaving/callsTJP/Class1.java @@ -0,0 +1,5 @@ +public class Class1 { + public static void main(String[]argv) { + System.out.println("Class1.main"); + } +} diff --git a/tests/features167/overweaving/callsTJP/Class2.java b/tests/features167/overweaving/callsTJP/Class2.java new file mode 100644 index 000000000..b602a2fe9 --- /dev/null +++ b/tests/features167/overweaving/callsTJP/Class2.java @@ -0,0 +1,5 @@ +public class Class2 { + public static void main(String[]argv) { + System.out.println("Class2.main"); + } +} diff --git a/tests/features167/overweaving/callsTJP/aop.xml b/tests/features167/overweaving/callsTJP/aop.xml new file mode 100644 index 000000000..956854a9e --- /dev/null +++ b/tests/features167/overweaving/callsTJP/aop.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/tests/features167/overweaving/getsetTJP/A.aj b/tests/features167/overweaving/getsetTJP/A.aj new file mode 100644 index 000000000..85e5d1f5e --- /dev/null +++ b/tests/features167/overweaving/getsetTJP/A.aj @@ -0,0 +1,3 @@ +public aspect A { + before(): !cflow(adviceexecution()) && get(* *) {System.out.println("A:"+thisJoinPoint);} +} diff --git a/tests/features167/overweaving/getsetTJP/B.aj b/tests/features167/overweaving/getsetTJP/B.aj new file mode 100644 index 000000000..5c36c4a76 --- /dev/null +++ b/tests/features167/overweaving/getsetTJP/B.aj @@ -0,0 +1,3 @@ +public aspect B { + before(): !cflow(adviceexecution()) && set(* *) {System.out.println("B:"+thisJoinPoint);} +} diff --git a/tests/features167/overweaving/getsetTJP/Class1.java b/tests/features167/overweaving/getsetTJP/Class1.java new file mode 100644 index 000000000..029c8d831 --- /dev/null +++ b/tests/features167/overweaving/getsetTJP/Class1.java @@ -0,0 +1,6 @@ +public class Class1 { + public static String message = "Class1.main"; + public static void main(String[]argv) { + System.out.println(message); + } +} diff --git a/tests/features167/overweaving/getsetTJP/Class2.java b/tests/features167/overweaving/getsetTJP/Class2.java new file mode 100644 index 000000000..5e3c6cf3c --- /dev/null +++ b/tests/features167/overweaving/getsetTJP/Class2.java @@ -0,0 +1,6 @@ +public class Class2 { + public static String message = "Class2.main"; + public static void main(String[]argv) { + System.out.println(message); + } +} diff --git a/tests/features167/overweaving/getsetTJP/aop.xml b/tests/features167/overweaving/getsetTJP/aop.xml new file mode 100644 index 000000000..956854a9e --- /dev/null +++ b/tests/features167/overweaving/getsetTJP/aop.xml @@ -0,0 +1,12 @@ + + + + + + + + + + diff --git a/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java index e29bd3349..daff18842 100644 --- a/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java +++ b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java @@ -33,6 +33,10 @@ public class OverweavingTests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("getset - 2"); // testing what actually happens when overweaving } + public void testGetSetTjp1() { + runTest("getset - tjp - 1"); + } + public void testCalls1() { runTest("calls - 1"); // testing what should happen for calls } @@ -41,6 +45,10 @@ public class OverweavingTests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("calls - 2"); // testing what actually happens when overweaving } + public void testCallsTjp1() { + runTest("calls - tjp - 1"); + } + public void testComplex() { runTest("really messy"); } diff --git a/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml index 159bcf772..73f449aaa 100644 --- a/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml +++ b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml @@ -2,7 +2,6 @@ - @@ -47,6 +46,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -89,6 +112,28 @@ + + + + + + + + + + + + + + + + + + + + + + -- 2.39.5