]> source.dussan.org Git - aspectj.git/commitdiff
309336: testcode
authoraclement <aclement>
Fri, 16 Apr 2010 18:01:09 +0000 (18:01 +0000)
committeraclement <aclement>
Fri, 16 Apr 2010 18:01:09 +0000 (18:01 +0000)
tests/bugs169/pr309336/NoSystemStreams.aj [new file with mode: 0644]
tests/bugs169/pr309336/Operators.java [new file with mode: 0644]
tests/bugs169/pr309336/UseOperators.java [new file with mode: 0644]
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
tests/src/org/aspectj/systemtest/ajc169/ajc169.xml

diff --git a/tests/bugs169/pr309336/NoSystemStreams.aj b/tests/bugs169/pr309336/NoSystemStreams.aj
new file mode 100644 (file)
index 0000000..49e0e2b
--- /dev/null
@@ -0,0 +1,4 @@
+
+aspect NoSystemStreams {
+       declare warning :  get (java.io.PrintStream System.out) : "No system.out";
+}
\ No newline at end of file
diff --git a/tests/bugs169/pr309336/Operators.java b/tests/bugs169/pr309336/Operators.java
new file mode 100644 (file)
index 0000000..5c135f7
--- /dev/null
@@ -0,0 +1,82 @@
+//package com.msr;
+
+import java.rmi.RemoteException;
+
+public abstract class Operators {
+/*
+       public interface Operator14<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable, E10 extends Throwable, E11 extends Throwable, E12 extends Throwable, E13 extends Throwable, E14 extends Throwable> {
+               T execute(String aArg) throws E1, E2, E3, E4, E5, E6, E7, E8, E9, E10,
+                               E11, E12, E13, E14, RemoteException;
+       }
+
+       public interface Operator13<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable, E10 extends Throwable, E11 extends Throwable, E12 extends Throwable, E13 extends Throwable>
+                       extends
+                       Operator14<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E13, E13> {
+                T execute(String aArg) throws E1, E2, E3, E4, E5, E6, E7, E8, E9,
+                E10, E11, E12, RemoteException;
+       }
+
+       public interface Operator12<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable, E10 extends Throwable, E11 extends Throwable, E12 extends Throwable>
+                       extends
+                       Operator13<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E12, E12> {
+               // T execute(String aMindServer, String aSessionId, String
+               // aMindServerIdentifier ) throws E1, E2, E3, E4, E5, E6, E7, E8, E9,
+               // E10, E11, E12, RemoteException;
+       }
+
+*/
+       public interface Operator11<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable, E10 extends Throwable, E11 extends Throwable>
+{/*
+                       extends
+                       Operator12<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E11, E11> {
+*/
+          T execute(String aArg) throws E1,E2,E3,E4,E5,E7,E8,E10,E11, RemoteException;
+       }
+
+       public interface Operator10<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable, E10 extends Throwable>
+                       extends Operator11<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E10, E10> {
+
+       }
+
+       public interface Operator9<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable, E9 extends Throwable>
+                       extends Operator10<T, E1, E2, E3, E4, E5, E6, E7, E8, E9, E9> {
+       }
+
+       public interface Operator8<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable, E8 extends Throwable>
+                       extends Operator9<T, E1, E2, E3, E4, E5, E6, E7, E8, E8> {
+       }
+
+       public interface Operator7<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable, E7 extends Throwable>
+                       extends Operator8<T, E1, E2, E3, E4, E5, E6, E7, E7> {
+       }
+
+       //
+       public interface Operator6<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable, E6 extends Throwable>
+                       extends Operator7<T, E1, E2, E3, E4, E5, E6, E6> {
+
+       }
+
+       public interface Operator5<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable, E5 extends Throwable>
+                       extends Operator6<T, E1, E2, E3, E4, E5, E5> {
+       }
+
+       public interface Operator4<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable, E4 extends Throwable>
+                       extends Operator5<T, E1, E2, E3, E4, E4> {
+       }
+
+       public interface Operator3<T, E1 extends Throwable, E2 extends Throwable, E3 extends Throwable>
+                       extends Operator4<T, E1, E2, E3, E3> {
+       }
+
+       public interface Operator2<T, E1 extends Throwable, E2 extends Throwable>
+                       extends Operator3<T, E1, E2, E2> {
+
+       }
+
+       public interface Operator1<T, E1 extends Throwable> extends
+                       Operator2<T, E1, E1> {
+       }
+
+       public interface Operator<T> extends Operator1<T, RuntimeException> {
+       }
+}
diff --git a/tests/bugs169/pr309336/UseOperators.java b/tests/bugs169/pr309336/UseOperators.java
new file mode 100644 (file)
index 0000000..3d39dd6
--- /dev/null
@@ -0,0 +1,18 @@
+import java.rmi.RemoteException;
+
+
+class UseOperators {
+       public void f3() throws NullPointerException, RemoteException
+       {
+               Operators.Operator<String> f = new Operators.Operator<String>() {
+
+                       public String execute(String aArg) throws NullPointerException,
+                                       RemoteException {
+                               System.out.println("Doh!");
+                               return aArg;
+                       }
+                       
+               }; 
+               f.execute("");
+       }
+}
\ No newline at end of file
index d6abf079600ad3e20b97b111bc2130eecd597cd6..4d343135cf1c843752addf0d7bf8138a6ac5376a 100644 (file)
@@ -29,7 +29,11 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
        // public void testAdvisingPrivilegedAccessMethod_307147() {
        // runTest("advising privileged access method");
        // }
+
        /*
+       public void testPipeliningAndGenerics_309336() {
+               runTest("pipelining and generics");
+       }
        public void testCrashParamAnnos_309440() {
                runTest("crash param annos");
        }
index c877cd92bd3e947a4b37d084e0b6716fa7c308fc..052e7a14063f1e501a4b5ebe58ade96574015407 100644 (file)
@@ -2,6 +2,10 @@
 
 <suite>
 
+   <ajc-test dir="bugs169/pr309336" title="pipelining and generics">
+     <compile files="NoSystemStreams.aj UseOperators.java Operators.java" options="-1.5"/>
+  </ajc-test>
+  
    <ajc-test dir="bugs169/pr308773" title="subtle generics problem">
      <compile files="Aspy.aj Zzz.java Top.java Middle.java" options="-1.5"/>
   </ajc-test>
   </ajc-test>
   
   <ajc-test dir="bugs169/pr291206" title="declare type warning - 2">
-     <compile files="Two.java" options="-1.5 -XhasMember">
+     <compile files="Two.java" options="-1.5">
        <message kind="warning" line="7" text="Missing foo()"/>
        <message kind="warning" line="13" text="Missing foo()"/>
      </compile>
   
   <!-- testing build of model with one of these in -->
   <ajc-test dir="bugs169/pr291206" title="declare type warning - 3">
-     <compile files="Two.java" options="-1.5 -XhasMember -emacssym">
+     <compile files="Two.java" options="-1.5 -emacssym">
        <message kind="warning" line="7" text="Missing foo()"/>
        <message kind="warning" line="13" text="Missing foo()"/>
      </compile>
   </ajc-test>
   
   <ajc-test dir="bugs169/pr291206" title="declare type error - 1">
-     <compile files="Three.java" options="-1.5 -XhasMember">
+     <compile files="Three.java" options="-1.5">
        <message kind="error" line="7" text="Missing foo()"/>
        <message kind="error" line="13" text="Missing foo()"/>
      </compile>