From 0ad779a799bd8a7dfb6d248aa9cc4c822517dd90 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 27 May 2008 16:44:14 +0000 Subject: [PATCH] 233838: testcode: itd and declare precedence --- tests/bugs161/pr233838/Z.java | 17 +++++++++++++++++ tests/bugs161/pr233838/Z2.java | 17 +++++++++++++++++ .../systemtest/ajc161/Ajc161Tests.java | 2 ++ .../org/aspectj/systemtest/ajc161/ajc161.xml | 19 +++++++++++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/bugs161/pr233838/Z.java create mode 100644 tests/bugs161/pr233838/Z2.java 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 @@ + + + + + + + + + + + + + + + + + + + -- 2.39.5