aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs161/pr233838/Z.java17
-rw-r--r--tests/bugs161/pr233838/Z2.java17
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/ajc161.xml19
4 files changed, 55 insertions, 0 deletions
diff --git a/tests/bugs161/pr233838/Z.java b/tests/bugs161/pr233838/Z.java
new file mode 100644
index 000000000..5a3e8bc71
--- /dev/null
+++ b/tests/bugs161/pr233838/Z.java
@@ -0,0 +1,17 @@
+interface X {
+ static aspect IMPL {
+ public void X.test() { System.out.println("X.test()"); }
+ }
+}
+
+interface Y {
+ static aspect IMPL {
+ declare precedence : X.IMPL, Y.IMPL;
+
+ public void Y.test() { System.out.println("Y.test()"); }
+ }
+}
+
+public class Z implements X, Y {
+ public static void main(String[] args) throws Exception { new Z().test(); }
+}
diff --git a/tests/bugs161/pr233838/Z2.java b/tests/bugs161/pr233838/Z2.java
new file mode 100644
index 000000000..9123a3485
--- /dev/null
+++ b/tests/bugs161/pr233838/Z2.java
@@ -0,0 +1,17 @@
+interface X {
+ static aspect IMPL {
+ public void X.test() { System.out.println("X.test()"); }
+ }
+}
+
+interface Y {
+ static aspect IMPL {
+ declare precedence : Y.IMPL, X.IMPL;
+
+ public void Y.test() { System.out.println("Y.test()"); }
+ }
+}
+
+public class Z2 implements X, Y {
+ public static void main(String[] args) throws Exception { new Z2().test(); }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
index 6fe3c414f..e36773624 100644
--- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
@@ -19,6 +19,8 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.1
+ public void testITDPrecedence_pr233838_1() { runTest("itd precedence - 1"); }
+ public void testITDPrecedence_pr233838_2() { runTest("itd precedence - 2"); }
public void testGetFieldGenerics_pr227401() { runTest("getfield problem with generics");}
public void testGenericAbstractAspects_pr231478() { runTest("generic abstract aspects"); }
public void testFieldJoinpointsAndAnnotationValues_pr227993() { runTest("field jp anno value"); }
diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
index de172f61f..d75609647 100644
--- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
+++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
@@ -3,6 +3,25 @@
<!-- AspectJ v1.6.1 Tests -->
<suite>
+ <ajc-test dir="bugs161/pr233838" title="itd precedence - 1">
+ <compile files="Z.java" options="-1.5"/>
+ <run class="Z">
+ <stdout>
+ <line text="X.test()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+ <ajc-test dir="bugs161/pr233838" title="itd precedence - 2">
+ <compile files="Z2.java" options="-1.5"/>
+ <run class="Z2">
+ <stdout>
+ <line text="Y.test()"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
+
<ajc-test dir="bugs161/pr227401" title="getfield problem with generics">
<compile files="Instrumentation.java Fails.java" options="-1.5"/>
<run class="Fails">