From 244a1c78371fab02a6b2a9937fcc27e6cf1bc61d Mon Sep 17 00:00:00 2001 From: aclement Date: Wed, 25 Jan 2006 10:43:34 +0000 Subject: [PATCH] test and fix for 125080 - mixing numbers of types in a generic type hierarchy --- tests/bugs151/pr125080/Test.java | 11 ++++++++++ tests/bugs151/pr125080/Test2.java | 20 +++++++++++++++++++ .../systemtest/ajc151/Ajc151Tests.java | 14 +++++++++++++ .../org/aspectj/systemtest/ajc151/ajc151.xml | 10 ++++++++++ 4 files changed, 55 insertions(+) create mode 100644 tests/bugs151/pr125080/Test.java create mode 100644 tests/bugs151/pr125080/Test2.java diff --git a/tests/bugs151/pr125080/Test.java b/tests/bugs151/pr125080/Test.java new file mode 100644 index 000000000..2beaa138b --- /dev/null +++ b/tests/bugs151/pr125080/Test.java @@ -0,0 +1,11 @@ +import java.util.*; + +interface AspectInterface { } + +abstract aspect AbstractAspect implements AspectInterface {} + +aspect ConcreteAspect extends AbstractAspect { + + public static void main(String []argv) { + } +} diff --git a/tests/bugs151/pr125080/Test2.java b/tests/bugs151/pr125080/Test2.java new file mode 100644 index 000000000..a6a02bdaf --- /dev/null +++ b/tests/bugs151/pr125080/Test2.java @@ -0,0 +1,20 @@ +import java.util.*; + +abstract aspect AbstractAspect implements AspectInterface {} + +interface AspectInterface { } + +aspect ConcreteAspect extends AbstractAspect { + public static void main(String []argv) { + } +} + +class Student { + private String name; + + public Student(String n) { + name = n; + } + + public String toString() { return name; } +} diff --git a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java index 16fcdd2fa..cf2e4d742 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java +++ b/tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java @@ -14,6 +14,7 @@ import java.io.File; import junit.framework.Test; +import org.aspectj.systemtest.ajc150.GenericsTests; import org.aspectj.testing.XMLBasedAjcTestCase; public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { @@ -30,6 +31,19 @@ public class Ajc151Tests extends org.aspectj.testing.XMLBasedAjcTestCase { //public void testIncorrectlyReferencingPointcuts_pr122452() { runTest("incorrectly referencing pointcuts");} //public void testIncorrectlyReferencingPointcuts_pr122452_2() { runTest("incorrectly referencing pointcuts - 2");} + public void testMixingNumbersOfTypeParameters_pr125080() { + runTest("mixing numbers of type parameters"); + GenericsTests.verifyClassSignature(ajc,"AspectInterface","Ljava/lang/Object;"); + GenericsTests.verifyClassSignature(ajc,"AbstractAspect","Ljava/lang/Object;LAspectInterface;"); + GenericsTests.verifyClassSignature(ajc,"ConcreteAspect","LAbstractAspect;"); + } + + public void testMixingNumbersOfTypeParameters_pr125080_2() { + runTest("mixing numbers of type parameters - 2"); + GenericsTests.verifyClassSignature(ajc,"AspectInterface","Ljava/lang/Object;"); + GenericsTests.verifyClassSignature(ajc,"AbstractAspect","Ljava/lang/Object;LAspectInterface;"); + GenericsTests.verifyClassSignature(ajc,"ConcreteAspect","LAbstractAspect;"); + } ///////////////////////////////////////// public static Test suite() { diff --git a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml index 28e85d036..b10528b45 100644 --- a/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml +++ b/tests/src/org/aspectj/systemtest/ajc151/ajc151.xml @@ -77,5 +77,15 @@ + + + + + + + + + + \ No newline at end of file -- 2.39.5