From a905c8e46f43684ef19adc4817374b82f2b0993d Mon Sep 17 00:00:00 2001 From: acolyer Date: Mon, 5 Sep 2005 14:07:39 +0000 Subject: tests for pr87530, final modifier on interface itdm --- tests/bugs150/pr87530/FinalITDMOnInterface.aj | 28 ++++++++++++++++++++++ tests/bugs150/pr87530/FinalITDMOnInterface2.aj | 24 +++++++++++++++++++ .../org/aspectj/systemtest/ajc150/Ajc150Tests.java | 4 ++++ tests/src/org/aspectj/systemtest/ajc150/ajc150.xml | 10 +++++++- 4 files changed, 65 insertions(+), 1 deletion(-) create mode 100644 tests/bugs150/pr87530/FinalITDMOnInterface.aj create mode 100644 tests/bugs150/pr87530/FinalITDMOnInterface2.aj diff --git a/tests/bugs150/pr87530/FinalITDMOnInterface.aj b/tests/bugs150/pr87530/FinalITDMOnInterface.aj new file mode 100644 index 000000000..b03bdef53 --- /dev/null +++ b/tests/bugs150/pr87530/FinalITDMOnInterface.aj @@ -0,0 +1,28 @@ +public class FinalITDMOnInterface { + + public static void main(String[] args) { + FinalITDMOnInterface f = new Sub(); + f.m(); + } + +} + +class Sub extends FinalITDMOnInterface { + + public void m() { + System.out.println("in class method"); + } + +} + +aspect A { + + interface TestInterface {} + + public final void TestInterface.m() { + System.out.println("in aspect declared method"); + } + + declare parents : FinalITDMOnInterface implements TestInterface; + +} \ No newline at end of file diff --git a/tests/bugs150/pr87530/FinalITDMOnInterface2.aj b/tests/bugs150/pr87530/FinalITDMOnInterface2.aj new file mode 100644 index 000000000..5b08e6e6d --- /dev/null +++ b/tests/bugs150/pr87530/FinalITDMOnInterface2.aj @@ -0,0 +1,24 @@ +public class FinalITDMOnInterface2 { + + public static void main(String[] args) { + FinalITDMOnInterface2 f = new FinalITDMOnInterface2(); + f.m(); + } + + public void m() { + System.out.println("in class method"); + } + +} + +aspect A { + + interface TestInterface {} + + public final void TestInterface.m() { + System.out.println("in aspect declared method"); + } + + declare parents : FinalITDMOnInterface2 implements TestInterface; + +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java index 57642f9bd..d2ca4d9cf 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc150/Ajc150Tests.java @@ -386,6 +386,10 @@ public class Ajc150Tests extends org.aspectj.testing.XMLBasedAjcTestCase { runTest("itd interface method already existing on interface"); } + public void testFinalITDMOnInterface() { + runTest("final itd methods on interfaces"); + } + // helper methods..... public SyntheticRepository createRepos(File cpentry) { diff --git a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml index e805601bf..27df1824a 100644 --- a/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml +++ b/tests/src/org/aspectj/systemtest/ajc150/ajc150.xml @@ -485,7 +485,15 @@ - + + + + + + + + + -- cgit v1.2.3