aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2010-05-28 20:52:15 +0000
committeraclement <aclement>2010-05-28 20:52:15 +0000
commita580a6fff505b5e8d725060ec969d7d43f19ed03 (patch)
tree2e159145a9c4d26affc80ab5145130f21bc9abab
parent892b919484658dab5a06f00b84767131491c3cca (diff)
downloadaspectj-a580a6fff505b5e8d725060ec969d7d43f19ed03.tar.gz
aspectj-a580a6fff505b5e8d725060ec969d7d43f19ed03.zip
314840: test and fix
-rw-r--r--tests/bugs169/pr314840/Arguments.aj21
-rw-r--r--tests/bugs169/pr314840/Test.java12
-rw-r--r--tests/bugs169/pr314840/Test1.java12
-rw-r--r--tests/bugs169/pr314840/Test2.java8
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java10
-rw-r--r--tests/src/org/aspectj/systemtest/ajc169/ajc169.xml13
6 files changed, 75 insertions, 1 deletions
diff --git a/tests/bugs169/pr314840/Arguments.aj b/tests/bugs169/pr314840/Arguments.aj
new file mode 100644
index 000000000..846a2008f
--- /dev/null
+++ b/tests/bugs169/pr314840/Arguments.aj
@@ -0,0 +1,21 @@
+package com.test;
+
+import org.aspectj.lang.ProceedingJoinPoint;
+import org.aspectj.lang.annotation.*;
+import org.aspectj.lang.annotation.Pointcut;
+
+public aspect Arguments {
+
+// @Pointcut("execution(@Test * *(..)) && @annotation(test) && @within( test1) && this(test2)")
+ // public void unit(Test2 test2, Test1 test1, Test test) {
+ // }
+
+ @Around("execution(@Test * *(..)) && @annotation(test) && @within( test1 ) && this(test2)")
+ public void test( ProceedingJoinPoint pjp,
+ Test test2,
+ Test1 test1,
+ Test test){
+
+ }
+}
+
diff --git a/tests/bugs169/pr314840/Test.java b/tests/bugs169/pr314840/Test.java
new file mode 100644
index 000000000..a97c943e9
--- /dev/null
+++ b/tests/bugs169/pr314840/Test.java
@@ -0,0 +1,12 @@
+package com.test;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention( RetentionPolicy.RUNTIME )
+@Target({ ElementType.METHOD })
+public @interface Test {
+
+}
diff --git a/tests/bugs169/pr314840/Test1.java b/tests/bugs169/pr314840/Test1.java
new file mode 100644
index 000000000..a4839e95f
--- /dev/null
+++ b/tests/bugs169/pr314840/Test1.java
@@ -0,0 +1,12 @@
+package com.test;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+@Retention( RetentionPolicy.RUNTIME )
+//@Target({ ElementType.METHOD })
+public @interface Test1 {
+
+}
diff --git a/tests/bugs169/pr314840/Test2.java b/tests/bugs169/pr314840/Test2.java
new file mode 100644
index 000000000..b6aec2817
--- /dev/null
+++ b/tests/bugs169/pr314840/Test2.java
@@ -0,0 +1,8 @@
+package com.test;
+
+@Test1
+public class Test2 {
+
+ @Test
+ public void m() { }
+}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
index 25e323f1b..40d2ea8b7 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
+++ b/tests/src/org/aspectj/systemtest/ajc169/Ajc169Tests.java
@@ -18,6 +18,14 @@ import org.aspectj.testing.XMLBasedAjcTestCase;
public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
+ public void testValidateBranchRecursion_314840() {
+ runTest("validate branch recursion");
+ }
+
+ public void testClashingDeclareAnnos_313026_1() {
+ runTest("clashing declare annos");
+ }
+
public void testClassFileSize_312839_1() {
runTest("class file size - 1");
// 2531 (0x404): 1.6.9.M2 size of Class.class
@@ -32,7 +40,7 @@ public class Ajc169Tests extends org.aspectj.testing.XMLBasedAjcTestCase {
// Aspect size (X.class) down from 6459 to 4722
// 4551: changed exact type pattern writing to use constant pool, and
// changed typepatternlist to not both writing/reading location
-
+
// TODO actually test something :)
}
diff --git a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
index b76de13b7..9ca3dd89c 100644
--- a/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
+++ b/tests/src/org/aspectj/systemtest/ajc169/ajc169.xml
@@ -2,6 +2,19 @@
<suite>
+ <ajc-test dir="bugs169/pr314840" title="validate branch recursion">
+ <compile files="Arguments.aj Test1.java Test2.java Test.java" options="-1.5"/>
+ </ajc-test>
+
+ <ajc-test dir="bugs169/pr313026/one" title="clashing declare annos">
+ <compile files="Target.java Asp.java Bsp.java Wibble.java Precedence1.java" options="-1.5 -Xlint:ignore"/>
+ <run class="Target">
+ <stdout>
+ <line text="@Wibble(value=abc)"/>
+ </stdout>
+ </run>
+ </ajc-test>
+
<ajc-test dir="bugs169/pr312839/one" title="class file size - 1">
<compile files="Class.java X.aj" options="-1.5"/>
<run class="com.wibble.foo.Class">