aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/bugs161/pr159268/C.java8
-rw-r--r--tests/bugs161/pr235505/A.java2
-rw-r--r--tests/bugs161/pr235505/B.java16
-rw-r--r--tests/bugs161/pr64222/C.java9
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java4
-rw-r--r--tests/src/org/aspectj/systemtest/ajc161/ajc161.xml26
6 files changed, 65 insertions, 0 deletions
diff --git a/tests/bugs161/pr159268/C.java b/tests/bugs161/pr159268/C.java
new file mode 100644
index 000000000..c2c4d3f9b
--- /dev/null
+++ b/tests/bugs161/pr159268/C.java
@@ -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
+ }
+}
diff --git a/tests/bugs161/pr235505/A.java b/tests/bugs161/pr235505/A.java
new file mode 100644
index 000000000..154cc56e3
--- /dev/null
+++ b/tests/bugs161/pr235505/A.java
@@ -0,0 +1,2 @@
+public privileged abstract aspect A<T> {
+}
diff --git a/tests/bugs161/pr235505/B.java b/tests/bugs161/pr235505/B.java
new file mode 100644
index 000000000..f06802c13
--- /dev/null
+++ b/tests/bugs161/pr235505/B.java
@@ -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);
+ }
+}
diff --git a/tests/bugs161/pr64222/C.java b/tests/bugs161/pr64222/C.java
new file mode 100644
index 000000000..f7c3c4024
--- /dev/null
+++ b/tests/bugs161/pr64222/C.java
@@ -0,0 +1,9 @@
+class C {
+ int dummy() {return 5;}
+}
+
+aspect Foo {
+ around(): call(int C.dummy()) {
+ proceed();
+ }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
index 34db793c2..ec13e0260 100644
--- a/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc161/Ajc161Tests.java
@@ -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");}
diff --git a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
index 1eac07aba..9f5c8fbca 100644
--- a/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
+++ b/tests/src/org/aspectj/systemtest/ajc161/ajc161.xml
@@ -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> \ No newline at end of file