From ca7f9f4bf393a4a1193773501b7d55ecd17ede1f Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 22 Jan 2008 23:48:51 +0000 Subject: [PATCH] pr206911: tests and fix: generic super itd --- tests/bugs160/pr206911/VerifyError.java | 15 ++++++++ tests/bugs160/pr206911/VerifyError2.java | 15 ++++++++ .../org/aspectj/systemtest/ajc154/ajc154.xml | 2 +- .../systemtest/ajc160/Ajc160Tests.java | 35 +++++++++++++++++++ .../systemtest/ajc160/AllTestsAspectJ160.java | 1 + .../org/aspectj/systemtest/ajc160/ajc160.xml | 16 +++++++++ 6 files changed, 83 insertions(+), 1 deletion(-) create mode 100644 tests/bugs160/pr206911/VerifyError.java create mode 100644 tests/bugs160/pr206911/VerifyError2.java create mode 100644 tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc160/ajc160.xml diff --git a/tests/bugs160/pr206911/VerifyError.java b/tests/bugs160/pr206911/VerifyError.java new file mode 100644 index 000000000..3db8dddf7 --- /dev/null +++ b/tests/bugs160/pr206911/VerifyError.java @@ -0,0 +1,15 @@ +package bugs; + +class GenericClass< K > { + public void f() {} +} +class ExtendsGenericHasITD extends GenericClass< Object > {} + +public aspect VerifyError { + public void ExtendsGenericHasITD.f() { + super.f(); + } + public static void main( String[] args ) { + new ExtendsGenericHasITD(); + } +} diff --git a/tests/bugs160/pr206911/VerifyError2.java b/tests/bugs160/pr206911/VerifyError2.java new file mode 100644 index 000000000..bb08b7eb0 --- /dev/null +++ b/tests/bugs160/pr206911/VerifyError2.java @@ -0,0 +1,15 @@ +package bugs; + +class GenericClass { + public void f(K t) {} +} +class ExtendsGenericHasITD extends GenericClass {} + +public aspect VerifyError2 { + public void ExtendsGenericHasITD.f(String s) { + super.f(s); + } + public static void main( String[] args ) { + new ExtendsGenericHasITD(); + } +} diff --git a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml index c15c78567..6c4e8c9b7 100644 --- a/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml +++ b/tests/src/org/aspectj/systemtest/ajc154/ajc154.xml @@ -1,6 +1,6 @@ - + diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java new file mode 100644 index 000000000..8d558576f --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java @@ -0,0 +1,35 @@ +/******************************************************************************* + * Copyright (c) 2006 IBM + * All rights reserved. This program and the accompanying materials + * are made available under the terms of the Eclipse Public License v1.0 + * which accompanies this distribution, and is available at + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: + * Andy Clement - initial API and implementation + *******************************************************************************/ +package org.aspectj.systemtest.ajc160; + +import java.io.File; + +import org.aspectj.testing.XMLBasedAjcTestCase; +import junit.framework.Test; + +/** + * These are tests for AspectJ1.6.0 + */ +public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase { + + public void testGenericsSuperITD_pr206911() { runTest("generics super itd"); } + public void testGenericsSuperITD_pr206911_2() { runTest("generics super itd - 2"); } + + ///////////////////////////////////////// + public static Test suite() { + return XMLBasedAjcTestCase.loadSuite(Ajc160Tests.class); + } + + protected File getSpecFile() { + return new File("../tests/src/org/aspectj/systemtest/ajc160/ajc160.xml"); + } + +} \ No newline at end of file diff --git a/tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java b/tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java index d9fab5cda..2335af4ef 100644 --- a/tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java +++ b/tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java @@ -21,6 +21,7 @@ public class AllTestsAspectJ160 { //$JUnit-BEGIN$ suite.addTest(SanityTests.suite()); suite.addTest(NewFeatures.suite()); + suite.addTest(Ajc160Tests.suite()); //$JUnit-END$ return suite; } diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml new file mode 100644 index 000000000..92cd0fd66 --- /dev/null +++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + + \ No newline at end of file -- 2.39.5