]> source.dussan.org Git - aspectj.git/commitdiff
pr206911: tests and fix: generic super itd
authoraclement <aclement>
Tue, 22 Jan 2008 23:48:51 +0000 (23:48 +0000)
committeraclement <aclement>
Tue, 22 Jan 2008 23:48:51 +0000 (23:48 +0000)
tests/bugs160/pr206911/VerifyError.java [new file with mode: 0644]
tests/bugs160/pr206911/VerifyError2.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc154/ajc154.xml
tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc160/AllTestsAspectJ160.java
tests/src/org/aspectj/systemtest/ajc160/ajc160.xml [new file with mode: 0644]

diff --git a/tests/bugs160/pr206911/VerifyError.java b/tests/bugs160/pr206911/VerifyError.java
new file mode 100644 (file)
index 0000000..3db8ddd
--- /dev/null
@@ -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 (file)
index 0000000..bb08b7e
--- /dev/null
@@ -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();
+          }
+}
index c15c7856715a14afb2b9eed884e11f3641e35942..6c4e8c9b7adbf4e08b9a03f08f962156625fcc22 100644 (file)
@@ -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 (file)
index 0000000..8d55857
--- /dev/null
@@ -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
index d9fab5cda9ad059019acd2846d62ad0c01d1f07f..2335af4ef1c6e74060538b77f194bf5f9bf33ac0 100644 (file)
@@ -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 (file)
index 0000000..92cd0fd
--- /dev/null
@@ -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