aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs154
diff options
context:
space:
mode:
authoraclement <aclement>2007-12-04 09:39:38 +0000
committeraclement <aclement>2007-12-04 09:39:38 +0000
commit4e7583aac32c77523a357f9606be6fd29ec62a6f (patch)
tree62f965e2437950f782cc066b03cef135b7431496 /tests/bugs154
parentd48385b2d02a73e4e68cb3e1a808e383a784d057 (diff)
downloadaspectj-4e7583aac32c77523a357f9606be6fd29ec62a6f.tar.gz
aspectj-4e7583aac32c77523a357f9606be6fd29ec62a6f.zip
166647 testcode: commented out in ajc154 - poor solution
Diffstat (limited to 'tests/bugs154')
-rw-r--r--tests/bugs154/pr166647/Aspect.java10
-rw-r--r--tests/bugs154/pr166647/ClassToAdvise.java11
-rw-r--r--tests/bugs154/pr166647/ClassWithMain.java8
-rw-r--r--tests/bugs154/pr166647/aop1.xml11
4 files changed, 40 insertions, 0 deletions
diff --git a/tests/bugs154/pr166647/Aspect.java b/tests/bugs154/pr166647/Aspect.java
new file mode 100644
index 000000000..1226637eb
--- /dev/null
+++ b/tests/bugs154/pr166647/Aspect.java
@@ -0,0 +1,10 @@
+package x;
+
+abstract aspect Aspect {
+
+ abstract pointcut scope();
+
+ before(): call(* foo(..)) && cflow(execution(* toplevel(..))) && scope() {
+ System.out.println("advice fired");
+ }
+} \ No newline at end of file
diff --git a/tests/bugs154/pr166647/ClassToAdvise.java b/tests/bugs154/pr166647/ClassToAdvise.java
new file mode 100644
index 000000000..863025c7d
--- /dev/null
+++ b/tests/bugs154/pr166647/ClassToAdvise.java
@@ -0,0 +1,11 @@
+package a;
+
+public class ClassToAdvise {
+
+ public void toplevel() {
+ foo();
+ }
+
+ public void foo() {}
+
+} \ No newline at end of file
diff --git a/tests/bugs154/pr166647/ClassWithMain.java b/tests/bugs154/pr166647/ClassWithMain.java
new file mode 100644
index 000000000..e2d30d25c
--- /dev/null
+++ b/tests/bugs154/pr166647/ClassWithMain.java
@@ -0,0 +1,8 @@
+package a;
+
+public class ClassWithMain {
+ public static void main(String []argv) {
+ new ClassToAdvise().toplevel();
+ new ClassToAdvise().foo();
+ }
+} \ No newline at end of file
diff --git a/tests/bugs154/pr166647/aop1.xml b/tests/bugs154/pr166647/aop1.xml
new file mode 100644
index 000000000..d4b88e7ef
--- /dev/null
+++ b/tests/bugs154/pr166647/aop1.xml
@@ -0,0 +1,11 @@
+<aspectj>
+ <aspects>
+ <concrete-aspect name="x.Aspect2" extends="x.Aspect">
+ <pointcut name="scope" expression="within(*)"/>
+ </concrete-aspect>
+ </aspects>
+ <!-- weaver options="-verbose -showWeaveInfo -debug"-->
+ <weaver>
+ <include within="a..*"/>
+ </weaver>
+</aspectj> \ No newline at end of file