summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorAndy Clement <aclement@pivotal.io>2015-11-18 14:43:41 -0800
committerAndy Clement <aclement@pivotal.io>2015-11-18 14:43:41 -0800
commit12d0a8268abb5100d7982e5be13c6cb0f8cdbf83 (patch)
tree965a686546c00c22fdf4058bc9a07ba76ddaa162 /tests
parent67448004cccae49b5dc05dfd71b6bb35e848e0b5 (diff)
downloadaspectj-12d0a8268abb5100d7982e5be13c6cb0f8cdbf83.tar.gz
aspectj-12d0a8268abb5100d7982e5be13c6cb0f8cdbf83.zip
Fix 478003: declare parents with generic itd npe
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs188/478003/OrientDBKeyIO.java22
-rw-r--r--tests/src/org/aspectj/systemtest/ajc188/Ajc188Tests.java42
-rw-r--r--tests/src/org/aspectj/systemtest/ajc188/AllTestsAspectJ188.java26
-rw-r--r--tests/src/org/aspectj/systemtest/ajc188/ajc188.xml9
4 files changed, 99 insertions, 0 deletions
diff --git a/tests/bugs188/478003/OrientDBKeyIO.java b/tests/bugs188/478003/OrientDBKeyIO.java
new file mode 100644
index 000000000..2397ae8d2
--- /dev/null
+++ b/tests/bugs188/478003/OrientDBKeyIO.java
@@ -0,0 +1,22 @@
+//import com.flickbay.orientdb.OrientKey;
+
+class OrientKey<T> {
+}
+
+class SimpleOrientDBValue extends OrientDBValue {}
+class OrientDBValue<T> {}
+
+public aspect OrientDBKeyIO {
+
+ public interface IO<T> {
+ OrientDBValue<T> getOrientDBValue();
+ }
+
+ declare parents : OrientKey implements IO;
+
+ public SimpleOrientDBValue OrientKey<T>.value = null;
+
+ public OrientDBValue OrientKey<T>.getOrientDBValue() { return this.value; }
+
+}
+
diff --git a/tests/src/org/aspectj/systemtest/ajc188/Ajc188Tests.java b/tests/src/org/aspectj/systemtest/ajc188/Ajc188Tests.java
new file mode 100644
index 000000000..11c503a89
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc188/Ajc188Tests.java
@@ -0,0 +1,42 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ajc188;
+
+import java.io.File;
+import java.lang.reflect.Method;
+import java.net.URL;
+import java.net.URLClassLoader;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * @author Andy Clement
+ */
+public class Ajc188Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public void testCompileError_478003() throws Exception {
+ runTest("compile error");
+ }
+
+ // ---
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc188Tests.class);
+ }
+
+ @Override
+ protected File getSpecFile() {
+ return getClassResource("ajc188.xml");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc188/AllTestsAspectJ188.java b/tests/src/org/aspectj/systemtest/ajc188/AllTestsAspectJ188.java
new file mode 100644
index 000000000..8867d9174
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc188/AllTestsAspectJ188.java
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * Copyright (c) 2014 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.ajc188;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.aspectj.systemtest.apt.AptTests;
+
+public class AllTestsAspectJ188 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.8.8 tests");
+ // $JUnit-BEGIN$
+ suite.addTest(Ajc188Tests.suite());
+ // $JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc188/ajc188.xml b/tests/src/org/aspectj/systemtest/ajc188/ajc188.xml
new file mode 100644
index 000000000..cc1214c18
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc188/ajc188.xml
@@ -0,0 +1,9 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+<ajc-test dir="bugs188/478003" title="compile error">
+<compile files="OrientDBKeyIO.java" options="-1.8"/>
+</ajc-test>
+
+</suite>