Browse Source

309336: testcode

tags/V1_6_9M2
aclement 14 years ago
parent
commit
f2c6356a17

+ 4
- 0
tests/bugs169/pr309336/NoSystemStreams.aj View File

@@ -0,0 +1,4 @@

aspect NoSystemStreams {
declare warning : get (java.io.PrintStream System.out) : "No system.out";
}

+ 82
- 0
tests/bugs169/pr309336/Operators.java View File

@@ -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> {
}
}

+ 18
- 0
tests/bugs169/pr309336/UseOperators.java View File

@@ -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("");
}
}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java View 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");
}

+ 7
- 3
tests/src/org/aspectj/systemtest/ajc169/ajc169.xml View 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>
@@ -178,7 +182,7 @@
</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>
@@ -186,14 +190,14 @@
<!-- 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>

Loading…
Cancel
Save