From 9052d5d86cfcdeb9a64ed903beea53d077f0de08 Mon Sep 17 00:00:00 2001 From: aclement Date: Mon, 6 Dec 2004 10:38:07 +0000 Subject: Fixes for Bug 80249: Order of types passed to compiler determines weaving behavior --- tests/decp/A.java | 2 ++ tests/decp/AspectX.java | 3 +++ tests/decp/B.java | 12 ++++++++++++ tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java | 8 ++++++-- tests/src/org/aspectj/systemtest/ajc150/ajc150-tests.xml | 12 ++++++++++-- 5 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 tests/decp/A.java create mode 100644 tests/decp/AspectX.java create mode 100644 tests/decp/B.java (limited to 'tests') diff --git a/tests/decp/A.java b/tests/decp/A.java new file mode 100644 index 000000000..f7e8cc3b9 --- /dev/null +++ b/tests/decp/A.java @@ -0,0 +1,2 @@ +public class A { +} diff --git a/tests/decp/AspectX.java b/tests/decp/AspectX.java new file mode 100644 index 000000000..9fb992f50 --- /dev/null +++ b/tests/decp/AspectX.java @@ -0,0 +1,3 @@ +public aspect AspectX { + declare parents: A+ implements java.io.Serializable; +} diff --git a/tests/decp/B.java b/tests/decp/B.java new file mode 100644 index 000000000..6a96c2e00 --- /dev/null +++ b/tests/decp/B.java @@ -0,0 +1,12 @@ +public class B extends A { + + public static void main(String[] args) { + B b = new B(); + if (b.getClass().getInterfaces().length>0) { + throw new RuntimeException("B should not implement any interfaces: "+b.getClass().getInterfaces()[0].toString()); + } + if (!(b instanceof java.io.Serializable)) { + throw new RuntimeException("B should be serializable! Inherited from A"); + } + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index e79edf0ba..25d4e8f80 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -26,7 +26,11 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { return new File("../tests/src/org/aspectj/systemtest/ajc150/ajc150.xml"); } - public void test() { - // placeholder for the first test... + public void test_typeProcessingOrderWhenDeclareParents() { + try { + runTest("Order of types passed to compiler determines weaving behavior"); + } finally { + System.err.println(ajc.getLastCompilationResult().getStandardError()); + } } } \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150-tests.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150-tests.xml index b770e0de2..f2023d6c9 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150-tests.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150-tests.xml @@ -1,7 +1,15 @@ - - + + + + + + + + + + \ No newline at end of file -- cgit v1.2.3