aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs161/pr226567/Bar.java9
-rw-r--r--tests/bugs161/pr226567/BarAspect.aj9
-rw-r--r--tests/bugs161/pr226567/Foo.java11
-rw-r--r--tests/bugs161/pr226567/Main.java12
-rw-r--r--tests/src/org/aspectj/systemtest/AllTests16.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java3
-rw-r--r--tests/src/org/aspectj/systemtest/ajc160/ajc160.xml4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java32
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/AllTestsAspectJ161.java25
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/ajc161.xml11
10 files changed, 118 insertions, 0 deletions
diff --git a/tests/bugs161/pr226567/Bar.java b/tests/bugs161/pr226567/Bar.java
new file mode 100644
index 000000000..c4a0316e1
--- /dev/null
+++ b/tests/bugs161/pr226567/Bar.java
@@ -0,0 +1,9 @@
+package b;
+
+import java.util.Collection;
+
+
+public interface Bar {
+
+ public Collection<Foo> getFoos();
+} \ No newline at end of file
diff --git a/tests/bugs161/pr226567/BarAspect.aj b/tests/bugs161/pr226567/BarAspect.aj
new file mode 100644
index 000000000..1c62a4867
--- /dev/null
+++ b/tests/bugs161/pr226567/BarAspect.aj
@@ -0,0 +1,9 @@
+package a;
+
+import b.Bar;
+import b.Foo;
+
+public aspect BarAspect {
+
+ declare parents : Foo implements Bar;
+} \ No newline at end of file
diff --git a/tests/bugs161/pr226567/Foo.java b/tests/bugs161/pr226567/Foo.java
new file mode 100644
index 000000000..db8076aab
--- /dev/null
+++ b/tests/bugs161/pr226567/Foo.java
@@ -0,0 +1,11 @@
+package b;
+
+import java.util.ArrayList;
+import java.util.Collection;
+
+public class Foo {
+
+ public Collection<Foo> getFoos() {
+ return new ArrayList<Foo>() {{ add(new Foo()); }};
+ }
+} \ No newline at end of file
diff --git a/tests/bugs161/pr226567/Main.java b/tests/bugs161/pr226567/Main.java
new file mode 100644
index 000000000..51eab3381
--- /dev/null
+++ b/tests/bugs161/pr226567/Main.java
@@ -0,0 +1,12 @@
+package c;
+
+import b.Bar;
+import b.Foo;
+
+public class Main {
+
+ public static void main(String [] args) {
+ Foo foo = new Foo();
+ System.out.println(foo instanceof Bar);
+ }
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/AllTests16.java b/tests/src/org/aspectj/systemtest/AllTests16.java
index d23413e83..a698fba28 100644
--- a/tests/src/org/aspectj/systemtest/AllTests16.java
+++ b/tests/src/org/aspectj/systemtest/AllTests16.java
@@ -7,6 +7,7 @@ import junit.framework.Test;
import junit.framework.TestSuite;
import org.aspectj.systemtest.ajc160.AllTestsAspectJ160;
+import org.aspectj.systemtest.ajc161.AllTestsAspectJ161;
public class AllTests16 {
@@ -14,6 +15,7 @@ public class AllTests16 {
TestSuite suite = new TestSuite("AspectJ System Test Suite - JDK 1.6");
//$JUnit-BEGIN$
suite.addTest(AllTestsAspectJ160.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour
+ suite.addTest(AllTestsAspectJ161.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour
suite.addTest(AllTests15.suite());
//$JUnit-END$
return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
index 7d20871db..6c993299f 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc160/Ajc160Tests.java
@@ -22,6 +22,9 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc160Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// AspectJ1.6.0rc1
+ // public void testPipelineCompilationGenericReturnType_pr226567() {
+ // runTest("pipeline compilation and generic return type");
+ //}
public void testPipelineCompilationAnonymous_pr225916() {
runTest("pipeline compilation and anonymous type");
}
diff --git a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
index eb8f28b06..809d307d0 100644
--- a/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
+++ b/tests/src/org/aspectj/systemtest/ajc160/ajc160.xml
@@ -3,6 +3,10 @@
<!-- AspectJ v1.6.0 Tests -->
<suite>
+ <ajc-test dir="bugs160/pr226567" title="pipeline compilation and generic return type">
+ <compile files="BarAspect.aj Foo.java Bar.java" options="-1.5"/>
+ <compile files="BarAspect.aj Bar.java Foo.java" options="-1.5"/>
+ </ajc-test>
<ajc-test dir="bugs160/pr225916" title="pipeline compilation and anonymous type">
<compile files="Test.java TestMBean.java TestAspect.java" options="-showWeaveInfo">
diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
new file mode 100644
index 000000000..d9321b6aa
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Contributors
+ * 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.ajc161;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ // AspectJ1.6.0rc1
+ public void testPipelineCompilationGenericReturnType_pr226567() { runTest("pipeline compilation and generic return type"); }
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc161Tests.class);
+ }
+
+ protected File getSpecFile() {
+ return new File("../tests/src/org/aspectj/systemtest/ajc161/ajc161.xml");
+ }
+
+} \ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc161/AllTestsAspectJ161.java b/tests/src/org/aspectj/systemtest/ajc161/AllTestsAspectJ161.java
new file mode 100644
index 000000000..5ce598fa8
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc161/AllTestsAspectJ161.java
@@ -0,0 +1,25 @@
+/*******************************************************************************
+ * Copyright (c) 2008 Contributors
+ * 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.ajc161;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ161 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.6.1 tests");
+ //$JUnit-BEGIN$
+ suite.addTest(Ajc161Tests.suite());
+ //$JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
new file mode 100644
index 000000000..77b0b60af
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- AspectJ v1.6.1 Tests -->
+<suite>
+
+ <ajc-test dir="bugs161/pr226567" title="pipeline compilation and generic return type">
+ <compile files="BarAspect.aj Foo.java Bar.java" options="-1.5"/>
+ <compile files="BarAspect.aj Bar.java Foo.java" options="-1.5"/>
+ </ajc-test>
+
+</suite> \ No newline at end of file