aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/features167/overweaving/cflow/A.aj2
-rw-r--r--tests/features167/overweaving/cflow/X.aj2
-rw-r--r--tests/features167/overweaving/messy/A.aj2
-rw-r--r--tests/features167/overweaving/messy/X.aj2
-rw-r--r--tests/features167/overweaving/messy2/A.aj3
-rw-r--r--tests/features167/overweaving/messy2/B.aj3
-rw-r--r--tests/features167/overweaving/messy2/Class1.java5
-rw-r--r--tests/features167/overweaving/messy2/Class2.java5
-rw-r--r--tests/features167/overweaving/messy2/aop.xml12
-rw-r--r--tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc167/overweaving.xml34
11 files changed, 64 insertions, 10 deletions
diff --git a/tests/features167/overweaving/cflow/A.aj b/tests/features167/overweaving/cflow/A.aj
index 961f489c1..b7e3fcb91 100644
--- a/tests/features167/overweaving/cflow/A.aj
+++ b/tests/features167/overweaving/cflow/A.aj
@@ -10,7 +10,7 @@ aspect A {
public void C.m() {}
before(): execution(* C.main(..)) {
- System.out.println("AspectA>>"+thisJoinPointStaticPart);
+ System.out.println("A:"+thisJoinPointStaticPart);
}
}
diff --git a/tests/features167/overweaving/cflow/X.aj b/tests/features167/overweaving/cflow/X.aj
index e8fe7dfb0..9c576aeed 100644
--- a/tests/features167/overweaving/cflow/X.aj
+++ b/tests/features167/overweaving/cflow/X.aj
@@ -1,6 +1,6 @@
aspect X {
before(): cflow(execution(* main(..))) && execution(* *(..)) {
- System.out.println("AspectX>>"+thisJoinPointStaticPart);
+ System.out.println("X:"+thisJoinPointStaticPart);
}
}
diff --git a/tests/features167/overweaving/messy/A.aj b/tests/features167/overweaving/messy/A.aj
index 961f489c1..b7e3fcb91 100644
--- a/tests/features167/overweaving/messy/A.aj
+++ b/tests/features167/overweaving/messy/A.aj
@@ -10,7 +10,7 @@ aspect A {
public void C.m() {}
before(): execution(* C.main(..)) {
- System.out.println("AspectA>>"+thisJoinPointStaticPart);
+ System.out.println("A:"+thisJoinPointStaticPart);
}
}
diff --git a/tests/features167/overweaving/messy/X.aj b/tests/features167/overweaving/messy/X.aj
index 8c51d6072..8eee320b9 100644
--- a/tests/features167/overweaving/messy/X.aj
+++ b/tests/features167/overweaving/messy/X.aj
@@ -1,6 +1,6 @@
aspect X {
before(): execution(* *(..)) {
- System.out.println("AspectX>>"+thisJoinPointStaticPart);
+ System.out.println("X:"+thisJoinPointStaticPart);
}
}
diff --git a/tests/features167/overweaving/messy2/A.aj b/tests/features167/overweaving/messy2/A.aj
new file mode 100644
index 000000000..78f5b99a2
--- /dev/null
+++ b/tests/features167/overweaving/messy2/A.aj
@@ -0,0 +1,3 @@
+public aspect A {
+ before(): execution(* *(..)) {System.out.println("A:"+thisJoinPointStaticPart);}
+}
diff --git a/tests/features167/overweaving/messy2/B.aj b/tests/features167/overweaving/messy2/B.aj
new file mode 100644
index 000000000..d35d27477
--- /dev/null
+++ b/tests/features167/overweaving/messy2/B.aj
@@ -0,0 +1,3 @@
+public aspect B {
+ before(): execution(* *(..)) {System.out.println("B:"+thisJoinPointStaticPart);}
+}
diff --git a/tests/features167/overweaving/messy2/Class1.java b/tests/features167/overweaving/messy2/Class1.java
new file mode 100644
index 000000000..c89605ca0
--- /dev/null
+++ b/tests/features167/overweaving/messy2/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/messy2/Class2.java b/tests/features167/overweaving/messy2/Class2.java
new file mode 100644
index 000000000..b602a2fe9
--- /dev/null
+++ b/tests/features167/overweaving/messy2/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/messy2/aop.xml b/tests/features167/overweaving/messy2/aop.xml
new file mode 100644
index 000000000..956854a9e
--- /dev/null
+++ b/tests/features167/overweaving/messy2/aop.xml
@@ -0,0 +1,12 @@
+<aspectj>
+<aspects>
+ <aspect name="A"/>
+ <aspect name="B"/>
+</aspects>
+<weaver options="-verbose -Xset:overWeaving=true -debug -showWeaveInfo">
+<!--
+ <dump within="*" beforeandafter="true"/>
+-->
+</weaver>
+
+</aspectj>
diff --git a/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java
index 373bae6b0..1ced76f59 100644
--- a/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java
+++ b/tests/src/org/aspectj/systemtest/ajc167/OverweavingTests.java
@@ -22,6 +22,10 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
*/
public class OverweavingTests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testComplex() {
+ runTest("really messy");
+ }
+
public void testSimple() {
runTest("simple");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml
index 84bed6486..358ab7d85 100644
--- a/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml
+++ b/tests/src/org/aspectj/systemtest/ajc167/overweaving.xml
@@ -2,6 +2,28 @@
<suite>
+ <ajc-test dir="features167/overweaving/messy2" title="really messy">
+ <compile files="A.aj Class1.java" options="-1.5"/>
+ <compile files="B.aj" options="-1.5 -Xlint:ignore"/>
+ <compile files="Class2.java" options="-1.5 -Xlint:ignore"/>
+ <run class="Class1" ltw="aop.xml">
+ <stdout>
+ <!-- should be advised by both, but was *already* advised by A during first weave -->
+ <line text="B:execution(void Class1.main(String[]))"/>
+ <line text="A:execution(void Class1.main(String[]))"/>
+ <line text="Class1.main"/>
+ </stdout>
+ </run>
+
+ <run class="Class2" ltw="aop.xml">
+ <stdout>
+ <line text="A:execution(void Class2.main(String[]))"/>
+ <line text="B:execution(void Class2.main(String[]))"/>
+ <line text="Class2.main"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="features167/overweaving" title="simple">
<compile files="A.aj C.java" options="-1.5"/>
<compile files="X.aj" options="-1.5 -Xlint:ignore"/>
@@ -20,9 +42,9 @@
<compile files="X.aj" options="-1.5 -Xlint:ignore"/>
<run class="com.andy.C" ltw="aop.xml">
<stdout>
- <line text="AspectX&gt;&gt;execution(void com.andy.C.main(String[]))"/>
- <line text="AspectA&gt;&gt;execution(void com.andy.C.main(String[]))"/>
- <line text="AspectX&gt;&gt;execution(void com.andy.C.run())"/>
+ <line text="X:execution(void com.andy.C.main(String[]))"/>
+ <line text="A:execution(void com.andy.C.main(String[]))"/>
+ <line text="X:execution(void com.andy.C.run())"/>
<line text="hello andy"/>
</stdout>
</run>
@@ -33,9 +55,9 @@
<compile files="X.aj" options="-1.5 -Xlint:ignore"/>
<run class="com.andy.C" ltw="aop.xml">
<stdout>
- <line text="AspectX&gt;&gt;execution(void com.andy.C.main(String[]))"/>
- <line text="AspectA&gt;&gt;execution(void com.andy.C.main(String[]))"/>
- <line text="AspectX&gt;&gt;execution(void com.andy.C.run())"/>
+ <line text="X:execution(void com.andy.C.main(String[]))"/>
+ <line text="A:execution(void com.andy.C.main(String[]))"/>
+ <line text="X:execution(void com.andy.C.run())"/>
<line text="hello andy"/>
</stdout>
</run>