]> source.dussan.org Git - aspectj.git/commitdiff
testcode for 451966
authorAndy Clement <aclement@gopivotal.com>
Mon, 17 Nov 2014 20:09:56 +0000 (12:09 -0800)
committerAndy Clement <aclement@gopivotal.com>
Mon, 17 Nov 2014 20:09:56 +0000 (12:09 -0800)
tests/bugs185/451966/Code.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/AllTests18.java
tests/src/org/aspectj/systemtest/ajc185/Ajc185Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc185/AllTestsAspectJ185.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc185/ajc185.xml [new file with mode: 0644]

diff --git a/tests/bugs185/451966/Code.java b/tests/bugs185/451966/Code.java
new file mode 100644 (file)
index 0000000..7a60ede
--- /dev/null
@@ -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();
+  }
+}
index aecbe05ab79fc5904652c0250f8763cae98eff52..80e113ce26e5d05fd9985061bfc81ad725350c9b 100644 (file)
@@ -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 (file)
index 0000000..9fefaa5
--- /dev/null
@@ -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 (file)
index 0000000..a286daf
--- /dev/null
@@ -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 (file)
index 0000000..29ba4af
--- /dev/null
@@ -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>