]> source.dussan.org Git - aspectj.git/commitdiff
283229: serialversionuid field and interfaces
authoraclement <aclement>
Mon, 13 Jul 2009 17:35:34 +0000 (17:35 +0000)
committeraclement <aclement>
Mon, 13 Jul 2009 17:35:34 +0000 (17:35 +0000)
tests/bugs166/pr283229/Foo.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/AllTests16.java
tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc166/AllTestsAspectJ166.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc166/ajc166.xml [new file with mode: 0644]

diff --git a/tests/bugs166/pr283229/Foo.java b/tests/bugs166/pr283229/Foo.java
new file mode 100644 (file)
index 0000000..6cc94aa
--- /dev/null
@@ -0,0 +1,13 @@
+public class Foo implements I {
+  public static void main(String []argv) {
+    new Foo();
+  }
+}
+
+interface I {
+}
+
+
+aspect X {
+  declare parents: I implements java.io.Serializable;
+}
index 2c2572b90c543672d6480987192befd7e91404e1..c2f968b1ce4a09698f946c99405cc6bae99e0887 100644 (file)
@@ -12,6 +12,7 @@ import org.aspectj.systemtest.ajc162.AllTestsAspectJ162;
 import org.aspectj.systemtest.ajc163.AllTestsAspectJ163;
 import org.aspectj.systemtest.ajc164.AllTestsAspectJ164;
 import org.aspectj.systemtest.ajc165.AllTestsAspectJ165;
+import org.aspectj.systemtest.ajc166.AllTestsAspectJ166;
 
 public class AllTests16 {
 
@@ -25,6 +26,7 @@ public class AllTests16 {
                suite.addTest(AllTestsAspectJ163.suite());
                suite.addTest(AllTestsAspectJ164.suite());
                suite.addTest(AllTestsAspectJ165.suite());
+               suite.addTest(AllTestsAspectJ166.suite());
                suite.addTest(AllTests15.suite());
                // $JUnit-END$
                return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java b/tests/src/org/aspectj/systemtest/ajc166/Ajc166Tests.java
new file mode 100644 (file)
index 0000000..bd6283b
--- /dev/null
@@ -0,0 +1,40 @@
+/*******************************************************************************
+ * 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.ajc166;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class Ajc166Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+
+       // fix is too disruptive for 1.6.5
+       // public void testGenericsBridge_pr279983() {
+       // runTest("generics bridge");
+       // }
+
+       public void testInterfacesSerializable_pr283229() {
+               runTest("interfaces and serializable");
+       }
+
+       // ---
+
+       public static Test suite() {
+               return XMLBasedAjcTestCase.loadSuite(Ajc166Tests.class);
+       }
+
+       protected File getSpecFile() {
+               return new File("../tests/src/org/aspectj/systemtest/ajc166/ajc166.xml");
+       }
+
+}
\ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc166/AllTestsAspectJ166.java b/tests/src/org/aspectj/systemtest/ajc166/AllTestsAspectJ166.java
new file mode 100644 (file)
index 0000000..417b6ec
--- /dev/null
@@ -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.ajc166;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ166 {
+
+       public static Test suite() {
+               TestSuite suite = new TestSuite("AspectJ 1.6.5 tests");
+               // $JUnit-BEGIN$
+               suite.addTest(Ajc166Tests.suite());
+               // $JUnit-END$
+               return suite;
+       }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml b/tests/src/org/aspectj/systemtest/ajc166/ajc166.xml
new file mode 100644 (file)
index 0000000..cf35c7f
--- /dev/null
@@ -0,0 +1,18 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<suite>
+   
+   <ajc-test dir="bugs166/pr283229" title="interfaces and serializable">
+     <compile files="Foo.java" options="-1.5 -XaddSerialVersionUID"/>
+     <run class="Foo">
+     <!--
+       <stdout>
+         <line text="if method: public static final boolean X.ajc$if$1ba()"/>
+         <line text="if method: public static final boolean X.ajc$if$177()"/>
+         <line text="if method: public static final boolean X.ajc$if$165()"/>
+       </stdout>
+       -->
+     </run>
+   </ajc-test>
+
+</suite>
\ No newline at end of file