aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154/pr209019
diff options
context:
space:
mode:
authoraclement <aclement>2007-11-07 14:55:17 +0000
committeraclement <aclement>2007-11-07 14:55:17 +0000
commitb039791377f005005601d0d303150c5a376f1827 (patch)
tree966ed11fa54466e4ce80cee6bc25fbc839d590e0 /tests/bugs154/pr209019
parent08904ab5e37abd95a50875f36f4ed5ed757b0cc0 (diff)
downloadaspectj-b039791377f005005601d0d303150c5a376f1827.tar.gz
aspectj-b039791377f005005601d0d303150c5a376f1827.zip
testcode for 169432 and 209019
Diffstat (limited to 'tests/bugs154/pr209019')
-rw-r--r--tests/bugs154/pr209019/case1/A.java13
-rw-r--r--tests/bugs154/pr209019/case1/AbstractDurationMethod.java11
-rw-r--r--tests/bugs154/pr209019/case1/DurationMethod.java5
-rw-r--r--tests/bugs154/pr209019/case1/Runner.java7
-rw-r--r--tests/bugs154/pr209019/case2/A.java13
-rw-r--r--tests/bugs154/pr209019/case2/AbstractDurationMethod.java11
-rw-r--r--tests/bugs154/pr209019/case2/AtDurationMethod.java9
-rw-r--r--tests/bugs154/pr209019/case2/Runner.java7
-rw-r--r--tests/bugs154/pr209019/case3/A.java13
-rw-r--r--tests/bugs154/pr209019/case3/AbstractDurationMethod.java11
-rw-r--r--tests/bugs154/pr209019/case3/Runner.java7
-rw-r--r--tests/bugs154/pr209019/case3/aop.xml11
12 files changed, 118 insertions, 0 deletions
diff --git a/tests/bugs154/pr209019/case1/A.java b/tests/bugs154/pr209019/case1/A.java
new file mode 100644
index 000000000..838d4b5f6
--- /dev/null
+++ b/tests/bugs154/pr209019/case1/A.java
@@ -0,0 +1,13 @@
+package a.b;
+
+public class A {
+ public Object m1() {
+ return m2();
+ }
+
+ public Object m2() {
+ return m3();
+ }
+
+ public Object m3() {return "x";}
+}
diff --git a/tests/bugs154/pr209019/case1/AbstractDurationMethod.java b/tests/bugs154/pr209019/case1/AbstractDurationMethod.java
new file mode 100644
index 000000000..ff397ca5b
--- /dev/null
+++ b/tests/bugs154/pr209019/case1/AbstractDurationMethod.java
@@ -0,0 +1,11 @@
+package c.d;
+
+public abstract aspect AbstractDurationMethod {
+ public abstract pointcut methods();
+
+ Object around(): methods() {
+ Object o = proceed();
+ System.out.println("Proceeded at joinpoint "+thisJoinPoint);
+ return o;
+ }
+}
diff --git a/tests/bugs154/pr209019/case1/DurationMethod.java b/tests/bugs154/pr209019/case1/DurationMethod.java
new file mode 100644
index 000000000..6011c4ced
--- /dev/null
+++ b/tests/bugs154/pr209019/case1/DurationMethod.java
@@ -0,0 +1,5 @@
+package c.d;;
+
+public aspect DurationMethod extends AbstractDurationMethod {
+ public pointcut methods(): within(a.b.*) && call (public * a..*(..));
+}
diff --git a/tests/bugs154/pr209019/case1/Runner.java b/tests/bugs154/pr209019/case1/Runner.java
new file mode 100644
index 000000000..b41411662
--- /dev/null
+++ b/tests/bugs154/pr209019/case1/Runner.java
@@ -0,0 +1,7 @@
+import a.b.*;
+
+public class Runner {
+ public static void main(String []argv) {
+ new A().m1();
+ }
+}
diff --git a/tests/bugs154/pr209019/case2/A.java b/tests/bugs154/pr209019/case2/A.java
new file mode 100644
index 000000000..838d4b5f6
--- /dev/null
+++ b/tests/bugs154/pr209019/case2/A.java
@@ -0,0 +1,13 @@
+package a.b;
+
+public class A {
+ public Object m1() {
+ return m2();
+ }
+
+ public Object m2() {
+ return m3();
+ }
+
+ public Object m3() {return "x";}
+}
diff --git a/tests/bugs154/pr209019/case2/AbstractDurationMethod.java b/tests/bugs154/pr209019/case2/AbstractDurationMethod.java
new file mode 100644
index 000000000..ff397ca5b
--- /dev/null
+++ b/tests/bugs154/pr209019/case2/AbstractDurationMethod.java
@@ -0,0 +1,11 @@
+package c.d;
+
+public abstract aspect AbstractDurationMethod {
+ public abstract pointcut methods();
+
+ Object around(): methods() {
+ Object o = proceed();
+ System.out.println("Proceeded at joinpoint "+thisJoinPoint);
+ return o;
+ }
+}
diff --git a/tests/bugs154/pr209019/case2/AtDurationMethod.java b/tests/bugs154/pr209019/case2/AtDurationMethod.java
new file mode 100644
index 000000000..2fc5ea32c
--- /dev/null
+++ b/tests/bugs154/pr209019/case2/AtDurationMethod.java
@@ -0,0 +1,9 @@
+package c.d;
+
+import org.aspectj.lang.annotation.*;
+
+@Aspect
+public class AtDurationMethod extends AbstractDurationMethod {
+ @Pointcut("within(a.b.*) && call(public * a..*(..))")
+ public void methods() {}
+}
diff --git a/tests/bugs154/pr209019/case2/Runner.java b/tests/bugs154/pr209019/case2/Runner.java
new file mode 100644
index 000000000..b41411662
--- /dev/null
+++ b/tests/bugs154/pr209019/case2/Runner.java
@@ -0,0 +1,7 @@
+import a.b.*;
+
+public class Runner {
+ public static void main(String []argv) {
+ new A().m1();
+ }
+}
diff --git a/tests/bugs154/pr209019/case3/A.java b/tests/bugs154/pr209019/case3/A.java
new file mode 100644
index 000000000..838d4b5f6
--- /dev/null
+++ b/tests/bugs154/pr209019/case3/A.java
@@ -0,0 +1,13 @@
+package a.b;
+
+public class A {
+ public Object m1() {
+ return m2();
+ }
+
+ public Object m2() {
+ return m3();
+ }
+
+ public Object m3() {return "x";}
+}
diff --git a/tests/bugs154/pr209019/case3/AbstractDurationMethod.java b/tests/bugs154/pr209019/case3/AbstractDurationMethod.java
new file mode 100644
index 000000000..ff397ca5b
--- /dev/null
+++ b/tests/bugs154/pr209019/case3/AbstractDurationMethod.java
@@ -0,0 +1,11 @@
+package c.d;
+
+public abstract aspect AbstractDurationMethod {
+ public abstract pointcut methods();
+
+ Object around(): methods() {
+ Object o = proceed();
+ System.out.println("Proceeded at joinpoint "+thisJoinPoint);
+ return o;
+ }
+}
diff --git a/tests/bugs154/pr209019/case3/Runner.java b/tests/bugs154/pr209019/case3/Runner.java
new file mode 100644
index 000000000..b41411662
--- /dev/null
+++ b/tests/bugs154/pr209019/case3/Runner.java
@@ -0,0 +1,7 @@
+import a.b.*;
+
+public class Runner {
+ public static void main(String []argv) {
+ new A().m1();
+ }
+}
diff --git a/tests/bugs154/pr209019/case3/aop.xml b/tests/bugs154/pr209019/case3/aop.xml
new file mode 100644
index 000000000..8b7971038
--- /dev/null
+++ b/tests/bugs154/pr209019/case3/aop.xml
@@ -0,0 +1,11 @@
+<aspectj>
+ <aspects>
+ <aspect name="c.d.AbstractDurationMethod"/>
+ <concrete-aspect name="c.d.AtDurationMethod"
+ extends="c.d.AbstractDurationMethod">
+ <pointcut name="methods"
+ expression="within(a.b.*) AND call (public * a..*(..))" />
+ </concrete-aspect>
+ </aspects>
+ <weaver/>
+</aspectj>