aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs162
diff options
context:
space:
mode:
authoraclement <aclement>2008-09-11 07:11:27 +0000
committeraclement <aclement>2008-09-11 07:11:27 +0000
commit0bc43d34b27ced82b40e48ac0645ed1ba94d2d2f (patch)
tree95e90cc8244a0dc5d1e9b552254e576562e44f30 /tests/bugs162
parent2db57c9bd1c93f619f602fad1ac82034e6a18768 (diff)
downloadaspectj-0bc43d34b27ced82b40e48ac0645ed1ba94d2d2f.tar.gz
aspectj-0bc43d34b27ced82b40e48ac0645ed1ba94d2d2f.zip
246918: perclause: testcode
Diffstat (limited to 'tests/bugs162')
-rw-r--r--tests/bugs162/pr246918/Base.java6
-rw-r--r--tests/bugs162/pr246918/Base2.java8
-rw-r--r--tests/bugs162/pr246918/Code.java5
-rw-r--r--tests/bugs162/pr246918/Dode.java3
-rw-r--r--tests/bugs162/pr246918/aop1.xml10
-rw-r--r--tests/bugs162/pr246918/aop2.xml9
-rw-r--r--tests/bugs162/pr246918/aop3.xml10
-rw-r--r--tests/bugs162/pr246918/aop4.xml10
-rw-r--r--tests/bugs162/pr246918/readme.txt3
9 files changed, 64 insertions, 0 deletions
diff --git a/tests/bugs162/pr246918/Base.java b/tests/bugs162/pr246918/Base.java
new file mode 100644
index 000000000..463203f1e
--- /dev/null
+++ b/tests/bugs162/pr246918/Base.java
@@ -0,0 +1,6 @@
+public abstract aspect Base pertypewithin(*) {
+ before(): execution(* *(..)) && !within(Base+) {
+ System.err.println("advice fired "+thisJoinPoint.getSourceLocation().getWithinType());
+ }
+}
+
diff --git a/tests/bugs162/pr246918/Base2.java b/tests/bugs162/pr246918/Base2.java
new file mode 100644
index 000000000..c68a85e7b
--- /dev/null
+++ b/tests/bugs162/pr246918/Base2.java
@@ -0,0 +1,8 @@
+public abstract aspect Base2 pertypewithin(*) {
+ abstract pointcut scope();
+
+ before(): execution(* *(..)) && !within(Base2+) && scope() {
+ System.err.println("advice fired "+thisJoinPoint.getSourceLocation().getWithinType());
+ }
+}
+
diff --git a/tests/bugs162/pr246918/Code.java b/tests/bugs162/pr246918/Code.java
new file mode 100644
index 000000000..23d764f1d
--- /dev/null
+++ b/tests/bugs162/pr246918/Code.java
@@ -0,0 +1,5 @@
+public class Code {
+ public static void main(String[] argv) {
+ new Dode().foo();
+ }
+}
diff --git a/tests/bugs162/pr246918/Dode.java b/tests/bugs162/pr246918/Dode.java
new file mode 100644
index 000000000..305c586af
--- /dev/null
+++ b/tests/bugs162/pr246918/Dode.java
@@ -0,0 +1,3 @@
+public class Dode {
+ public void foo() {}
+}
diff --git a/tests/bugs162/pr246918/aop1.xml b/tests/bugs162/pr246918/aop1.xml
new file mode 100644
index 000000000..84ed60c94
--- /dev/null
+++ b/tests/bugs162/pr246918/aop1.xml
@@ -0,0 +1,10 @@
+<aspectj>
+ <aspects>
+ <concrete-aspect name="SubAspect" extends="Base" >
+ <pointcut name="scope" expression="within(*)"/>
+ </concrete-aspect>
+ </aspects>
+ <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+ <weaver options="">
+ </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop2.xml b/tests/bugs162/pr246918/aop2.xml
new file mode 100644
index 000000000..a90e7ef74
--- /dev/null
+++ b/tests/bugs162/pr246918/aop2.xml
@@ -0,0 +1,9 @@
+<aspectj>
+ <aspects>
+ <concrete-aspect name="SubAspect" extends="Base" perclause="pertypewithin(D*)">
+
+ </concrete-aspect>
+ </aspects>
+ <weaver>
+ </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop3.xml b/tests/bugs162/pr246918/aop3.xml
new file mode 100644
index 000000000..4d2daf617
--- /dev/null
+++ b/tests/bugs162/pr246918/aop3.xml
@@ -0,0 +1,10 @@
+<aspectj>
+ <aspects>
+ <concrete-aspect name="SubAspect" extends="Base2" perclause="pertypewithin(*)">
+ <pointcut name="scope" expression="within(D*)"/>
+ </concrete-aspect>
+ </aspects>
+ <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+ <weaver options="">
+ </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/aop4.xml b/tests/bugs162/pr246918/aop4.xml
new file mode 100644
index 000000000..7b7436c58
--- /dev/null
+++ b/tests/bugs162/pr246918/aop4.xml
@@ -0,0 +1,10 @@
+<aspectj>
+ <aspects>
+ <concrete-aspect name="SubAspect" extends="Base2" perclause="persausage(*)">
+ <pointcut name="scope" expression="within(D*)"/>
+ </concrete-aspect>
+ </aspects>
+ <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+ <weaver options="">
+ </weaver>
+</aspectj>
diff --git a/tests/bugs162/pr246918/readme.txt b/tests/bugs162/pr246918/readme.txt
new file mode 100644
index 000000000..18dc5d562
--- /dev/null
+++ b/tests/bugs162/pr246918/readme.txt
@@ -0,0 +1,3 @@
+aop1 - ptw base aspect with concrete aspect including single pointcut
+aop2 - ptw sub aspect limiting application to D* type (no xml pointcut)
+aop3 - ptw sub aspect, concretized scope in sub aspect