]> source.dussan.org Git - aspectj.git/commitdiff
162 test infra
authoraclement <aclement>
Thu, 3 Jul 2008 23:50:46 +0000 (23:50 +0000)
committeraclement <aclement>
Thu, 3 Jul 2008 23:50:46 +0000 (23:50 +0000)
tests/bugs162/pr239441/SampleAspect.java [new file with mode: 0644]
tests/bugs162/pr239441/Test3.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/AllTests16.java
tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc162/ajc162.xml [new file with mode: 0644]

diff --git a/tests/bugs162/pr239441/SampleAspect.java b/tests/bugs162/pr239441/SampleAspect.java
new file mode 100644 (file)
index 0000000..5aa4a36
--- /dev/null
@@ -0,0 +1,11 @@
+import java.lang.annotation.*;
+
+public aspect SampleAspect {
+  declare parents : hasmethod(@Something * *.*(..)) implements SampleInterface;
+
+  private interface SampleInterface{
+  }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface Something {}
\ No newline at end of file
diff --git a/tests/bugs162/pr239441/Test3.java b/tests/bugs162/pr239441/Test3.java
new file mode 100644 (file)
index 0000000..c743af7
--- /dev/null
@@ -0,0 +1,23 @@
+import java.util.*;
+public class Test3 {
+
+  public Iterator<Integer> iter = new Iterator<Integer>() {
+//
+//      @Override
+      public boolean hasNext() {
+        return false;
+      }
+//
+//      @Override
+      public Integer next() {
+        return null;
+      }
+//
+//      @Override
+      public void remove() {
+      }
+
+    };
+
+}
+
index a698fba2841ed520445b8f7593c390921845407a..8414657fb9fd2fb415dd9e3c25fffb2bc5fe7a80 100644 (file)
@@ -8,6 +8,7 @@ import junit.framework.TestSuite;
 
 import org.aspectj.systemtest.ajc160.AllTestsAspectJ160;
 import org.aspectj.systemtest.ajc161.AllTestsAspectJ161;
+import org.aspectj.systemtest.ajc162.AllTestsAspectJ162;
 
 public class AllTests16 {
 
@@ -16,6 +17,7 @@ public class AllTests16 {
                //$JUnit-BEGIN$
                suite.addTest(AllTestsAspectJ160.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour
         suite.addTest(AllTestsAspectJ161.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour
+        suite.addTest(AllTestsAspectJ162.suite()); // dont require a 1.6 JRE to run but checks 1.6 compiler behaviour
                suite.addTest(AllTests15.suite());
                //$JUnit-END$
                return suite;
diff --git a/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java b/tests/src/org/aspectj/systemtest/ajc162/Ajc162Tests.java
new file mode 100644 (file)
index 0000000..d8d539b
--- /dev/null
@@ -0,0 +1,32 @@
+/*******************************************************************************
+ * 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.ajc162;
+
+import java.io.File;
+
+import junit.framework.Test;
+
+import org.aspectj.testing.XMLBasedAjcTestCase;
+
+public class Ajc162Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+       
+       // AspectJ1.6.2 
+       public void testAnnotationDecp_pr239441() { runTest("annotation decp"); }
+
+       public static Test suite() {
+      return XMLBasedAjcTestCase.loadSuite(Ajc162Tests.class);
+    }
+
+    protected File getSpecFile() {
+      return new File("../tests/src/org/aspectj/systemtest/ajc162/ajc162.xml");
+    }
+  
+}
\ No newline at end of file
diff --git a/tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java b/tests/src/org/aspectj/systemtest/ajc162/AllTestsAspectJ162.java
new file mode 100644 (file)
index 0000000..409d0d6
--- /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.ajc162;
+
+import junit.framework.Test;
+import junit.framework.TestSuite;
+
+public class AllTestsAspectJ162 {
+
+       public static Test suite() {
+               TestSuite suite = new TestSuite("AspectJ 1.6.2 tests");
+               //$JUnit-BEGIN$
+               suite.addTest(Ajc162Tests.suite());
+        //$JUnit-END$
+               return suite;
+       }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml b/tests/src/org/aspectj/systemtest/ajc162/ajc162.xml
new file mode 100644 (file)
index 0000000..08e8627
--- /dev/null
@@ -0,0 +1,11 @@
+<!DOCTYPE suite SYSTEM "../tests/ajcTestSuite.dtd"[]>
+
+<!-- AspectJ v1.6.2 Tests -->
+<suite>
+
+       <ajc-test dir="bugs162/pr239441" title="annotation decp">
+       <compile files="Test3.java SampleAspect.java" options="-1.5 -showWeaveInfo -XhasMember">
+       </compile>
+    </ajc-test>    
+
+</suite>
\ No newline at end of file