summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authoraclement <aclement>2008-01-22 23:48:51 +0000
committeraclement <aclement>2008-01-22 23:48:51 +0000
commitca7f9f4bf393a4a1193773501b7d55ecd17ede1f (patch)
tree338a8d5072e2e2372221912dbfdeef7a8569205d /tests
parent114db350a407be5b0aa00d1b8b3baa60aa6911e2 (diff)
downloadaspectj-ca7f9f4bf393a4a1193773501b7d55ecd17ede1f.tar.gz
aspectj-ca7f9f4bf393a4a1193773501b7d55ecd17ede1f.zip
pr206911: tests and fix: generic super itd
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs160/pr206911/VerifyError.java15
-rw-r--r--tests/bugs160/pr206911/VerifyError2.java15
-rw-r--r--tests/src/org/aspectj/systemtest/ajc154/ajc154.xml2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java35
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java1
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml16
6 files changed, 83 insertions, 1 deletions
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<K> {
+ public void f(K t) {}
+}
+class ExtendsGenericHasITD extends GenericClass<String> {}
+
+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 @@
<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
-<!-- AspectJ v1.6.0 Tests -->
+<!-- AspectJ v1.5.4Tests -->
<suite>
<ajc-test dir="bugs154/pr166647" title="ltw and cflow problem">
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 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- AspectJ v1.6.0 Tests -->
+<suite>
+
+ <ajc-test dir="bugs160/pr206911" title="generics super itd">
+ <compile options="-1.5" files="VerifyError.java"/>
+ <run class="bugs.VerifyError"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs160/pr206911" title="generics super itd - 2">
+ <compile options="-1.5" files="VerifyError2.java"/>
+ <run class="bugs.VerifyError2"/>
+ </ajc-test>
+
+</suite> \ No newline at end of file