Browse Source

tests for 159268, 235505, 64222 (all parser related)

tags/V1_6_1rc1
aclement 16 years ago
parent
commit
58961143f7

+ 8
- 0
tests/bugs161/pr159268/C.java View File

@@ -0,0 +1,8 @@
public class C {

public static void main(String []argv) {
Object[] before;
before = new Object[10];
before[0].toString(); // Eclipse: Syntax error on token "before", invalid
}
}

+ 2
- 0
tests/bugs161/pr235505/A.java View File

@@ -0,0 +1,2 @@
public privileged abstract aspect A<T> {
}

+ 16
- 0
tests/bugs161/pr235505/B.java View File

@@ -0,0 +1,16 @@
privileged abstract aspect A<T> {
public void foo(T t) { System.out.println(t); }
before(T t): execution(* *(..)) && args(t) && !within(A+) { foo(t); }
}

aspect X extends A<String> {}

public class B {
public static void main(String []argv) {
new B().run("Hello World");
}

public void run(String s) {
System.out.println(s);
}
}

+ 9
- 0
tests/bugs161/pr64222/C.java View File

@@ -0,0 +1,9 @@
class C {
int dummy() {return 5;}
}

aspect Foo {
around(): call(int C.dummy()) {
proceed();
}
}

+ 4
- 0
tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java View File

@@ -27,6 +27,10 @@ public class Ajc161Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testComplexBoundsGenericAspect_pr199130_1() { runTest("complex bounds on generic aspect - 1");}
public void testComplexBoundsGenericAspect_pr199130_2() { runTest("complex bounds on generic aspect - 2");}
public void testComplexBoundsGenericAspect_pr199130_3() { runTest("complex bounds on generic aspect - 3");}
public void testPrivilegedGenericAspect_pr235505() { runTest("privileged generic aspect");}
public void testPrivilegedGenericAspect_pr235505_2() { runTest("privileged generic aspect - 2");}
public void testParsingAroundNoReturn_pr64222() { runTest("parsing around advice no return");}
public void testParsingBeforeArrayRef_pr159268() { runTest("before array name");}
public void testGenericAspectAroundAdvice_pr226201() { runTest("generic aspect around advice");}
public void testCrazyGenericsInnerTypes_pr235829() { runTest("crazy generics and inner types");}
public void testAnnotationExposureGenerics_pr235597() { runTest("annotation exposure and generics");}

+ 26
- 0
tests/src/org/aspectj/systemtest/ajc161/ajc161.xml View File

@@ -154,5 +154,31 @@
<compile files="BarAspect.aj Foo.java Bar.java" options="-1.5"/>
<compile files="BarAspect.aj Bar.java Foo.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs161/pr235505" title="privileged generic aspect">
<compile files="A.java" options="-1.5"/>
</ajc-test>
<ajc-test dir="bugs161/pr235505" title="privileged generic aspect - 2">
<compile files="B.java" options="-1.5"/>
<run class="B">
<stdout>
<line text="Hello World"/>
<line text="Hello World"/>
</stdout>
</run>
</ajc-test>
<ajc-test dir="bugs161/pr64222" title="parsing around advice no return">
<compile files="C.java" options="-1.5">
<message kind="error" line="6" text="to complete around advice declaration"/>
</compile>
</ajc-test>

<ajc-test dir="bugs161/pr159268" title="before array name">
<compile files="C.java" options="-1.5"/>
</ajc-test>

</suite>

Loading…
Cancel
Save