aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/bugs185/451966/Code.java16
-rw-r--r--tests/src/org/aspectj/systemtest/AllTests18.java2
-rw-r--r--tests/src/org/aspectj/systemtest/ajc185/Ajc185Tests.java39
-rw-r--r--tests/src/org/aspectj/systemtest/ajc185/AllTestsAspectJ185.java27
-rw-r--r--tests/src/org/aspectj/systemtest/ajc185/ajc185.xml17
5 files changed, 101 insertions, 0 deletions
diff --git a/tests/bugs185/451966/Code.java b/tests/bugs185/451966/Code.java
new file mode 100644
index 000000000..7a60ede4c
--- /dev/null
+++ b/tests/bugs185/451966/Code.java
@@ -0,0 +1,16 @@
+
+interface Common { }
+
+interface Allergies extends Common { }
+
+aspect Y {
+ private boolean Common.instancesInvariant() {
+ return false;
+ }
+}
+
+privileged aspect AspectJMLRac_allergies_Allergies {
+ before(final Allergies object$rac): execution(* Allergies+.*(..)) && this(object$rac) {
+ boolean b = object$rac.instancesInvariant();
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/AllTests18.java b/tests/src/org/aspectj/systemtest/AllTests18.java
index aecbe05ab..80e113ce2 100644
--- a/tests/src/org/aspectj/systemtest/AllTests18.java
+++ b/tests/src/org/aspectj/systemtest/AllTests18.java
@@ -18,12 +18,14 @@ import org.aspectj.systemtest.ajc181.AllTestsAspectJ181;
import org.aspectj.systemtest.ajc182.AllTestsAspectJ182;
import org.aspectj.systemtest.ajc183.AllTestsAspectJ183;
import org.aspectj.systemtest.ajc184.AllTestsAspectJ184;
+import org.aspectj.systemtest.ajc185.AllTestsAspectJ185;
public class AllTests18 {
public static Test suite() {
TestSuite suite = new TestSuite("AspectJ System Test Suite - 1.8");
// $JUnit-BEGIN$
+ suite.addTest(AllTestsAspectJ185.suite());
suite.addTest(AllTestsAspectJ184.suite());
suite.addTest(AllTestsAspectJ183.suite());
suite.addTest(AllTestsAspectJ182.suite());
diff --git a/tests/src/org/aspectj/systemtest/ajc185/Ajc185Tests.java b/tests/src/org/aspectj/systemtest/ajc185/Ajc185Tests.java
new file mode 100644
index 000000000..9fefaa5eb
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc185/Ajc185Tests.java
@@ -0,0 +1,39 @@
+/*******************************************************************************
+ * 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.ajc185;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+/**
+ * @author Andy Clement
+ */
+public class Ajc185Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+ public void testITDInterface_451966() throws Exception {
+ runTest("itd interface");
+ }
+
+ // ---
+
+ public static Test suite() {
+ return XMLBasedAjcTestCase.loadSuite(Ajc185Tests.class);
+ }
+
+ @Override
+ protected File getSpecFile() {
+ return getClassResource("ajc185.xml");
+ }
+
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc185/AllTestsAspectJ185.java b/tests/src/org/aspectj/systemtest/ajc185/AllTestsAspectJ185.java
new file mode 100644
index 000000000..a286daf0c
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc185/AllTestsAspectJ185.java
@@ -0,0 +1,27 @@
+/*******************************************************************************
+ * 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.ajc185;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+import org.aspectj.systemtest.apt.AptTests;
+
+public class AllTestsAspectJ185 {
+
+ public static Test suite() {
+ TestSuite suite = new TestSuite("AspectJ 1.8.5 tests");
+ // $JUnit-BEGIN$
+ suite.addTest(Ajc185Tests.suite());
+ suite.addTest(AptTests.suite());
+ // $JUnit-END$
+ return suite;
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc185/ajc185.xml b/tests/src/org/aspectj/systemtest/ajc185/ajc185.xml
new file mode 100644
index 000000000..29ba4af75
--- /dev/null
+++ b/tests/src/org/aspectj/systemtest/ajc185/ajc185.xml
@@ -0,0 +1,17 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+
+
+<ajc-test dir="bugs185/451966" title="itd interface">
+<compile files="Code.java" options="-1.8"/>
+<run class="One">
+ <stdout>
+ <line text="In instance check method doit()"/>
+ <line text="In advice()"/>
+ <line text="Method m() running"/>
+ </stdout>
+</run>
+</ajc-test>
+
+</suite>