From 12d0a8268abb5100d7982e5be13c6cb0f8cdbf83 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 18 Nov 2015 14:43:41 -0800 Subject: Fix 478003: declare parents with generic itd npe --- tests/bugs188/478003/OrientDBKeyIO.java | 22 ++++++++++++ .../org/aspectj/systemtest/ajc188/Ajc188Tests.java | 42 ++++++++++++++++++++++ .../systemtest/ajc188/AllTestsAspectJ188.java | 26 ++++++++++++++ tests/src/org/aspectj/systemtest/ajc188/ajc188.xml | 9 +++++ 4 files changed, 99 insertions(+) create mode 100644 tests/bugs188/478003/OrientDBKeyIO.java create mode 100644 tests/src/org/aspectj/systemtest/ajc188/Ajc188Tests.java create mode 100644 tests/src/org/aspectj/systemtest/ajc188/AllTestsAspectJ188.java create mode 100644 tests/src/org/aspectj/systemtest/ajc188/ajc188.xml (limited to 'tests') 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 { +} + +class SimpleOrientDBValue extends OrientDBValue {} +class OrientDBValue {} + +public aspect OrientDBKeyIO { + + public interface IO { + OrientDBValue getOrientDBValue(); + } + + declare parents : OrientKey implements IO; + + public SimpleOrientDBValue OrientKey.value = null; + + public OrientDBValue OrientKey.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 @@ + + + + + + + + + -- cgit v1.2.3