diff options
author | aclement <aclement> | 2006-09-22 10:49:37 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-09-22 10:49:37 +0000 |
commit | 98a5d925536b291ca760ca510a2e06b7e3cff13e (patch) | |
tree | d349cbb016ddc7b55dae0c6eace09803ca799f4f /tests/bugs153 | |
parent | 1138f942d5c2367ef8a6abb4d30e724730bc8f79 (diff) | |
download | aspectj-98a5d925536b291ca760ca510a2e06b7e3cff13e.tar.gz aspectj-98a5d925536b291ca760ca510a2e06b7e3cff13e.zip |
154054 testcode and fix: noticing changes in around advice and forcing full builds
Diffstat (limited to 'tests/bugs153')
-rw-r--r-- | tests/bugs153/pr154054/changes/MyAspect.20.aj | 10 | ||||
-rw-r--r-- | tests/bugs153/pr154054/src/MyAspect.aj | 10 | ||||
-rw-r--r-- | tests/bugs153/pr154054/src/MyClass.java | 19 | ||||
-rw-r--r-- | tests/bugs153/pr154054_2/changes/MyAspect.30.aj | 10 | ||||
-rw-r--r-- | tests/bugs153/pr154054_2/src/MyAspect.aj | 10 | ||||
-rw-r--r-- | tests/bugs153/pr154054_2/src/MyClass.java | 19 |
6 files changed, 78 insertions, 0 deletions
diff --git a/tests/bugs153/pr154054/changes/MyAspect.20.aj b/tests/bugs153/pr154054/changes/MyAspect.20.aj new file mode 100644 index 000000000..d2a7a7155 --- /dev/null +++ b/tests/bugs153/pr154054/changes/MyAspect.20.aj @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getX()) && !within(MyAspect); + + int around(): mypointcut() { + int w = proceed() + 4; + return w; + } + +} diff --git a/tests/bugs153/pr154054/src/MyAspect.aj b/tests/bugs153/pr154054/src/MyAspect.aj new file mode 100644 index 000000000..4aa4e9734 --- /dev/null +++ b/tests/bugs153/pr154054/src/MyAspect.aj @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getX()) && !within(MyAspect); + + int around(): mypointcut() { + int w = proceed() + 3; + return w; + } + +} diff --git a/tests/bugs153/pr154054/src/MyClass.java b/tests/bugs153/pr154054/src/MyClass.java new file mode 100644 index 000000000..4e81e3038 --- /dev/null +++ b/tests/bugs153/pr154054/src/MyClass.java @@ -0,0 +1,19 @@ +public class MyClass { + + int x; + + public int getX() { + return x; + } + + public void setX(int x) { + this.x = x; + } + + public static void main(String[] args) { + MyClass m = new MyClass(); + m.setX(10); + System.out.println(m.getX()); + } + +} diff --git a/tests/bugs153/pr154054_2/changes/MyAspect.30.aj b/tests/bugs153/pr154054_2/changes/MyAspect.30.aj new file mode 100644 index 000000000..f6d91ec38 --- /dev/null +++ b/tests/bugs153/pr154054_2/changes/MyAspect.30.aj @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getName()) && !within(MyAspect); + + String around(): mypointcut() { + String w = proceed() + " and Harry"; + return w; + } + +} diff --git a/tests/bugs153/pr154054_2/src/MyAspect.aj b/tests/bugs153/pr154054_2/src/MyAspect.aj new file mode 100644 index 000000000..b3b167963 --- /dev/null +++ b/tests/bugs153/pr154054_2/src/MyAspect.aj @@ -0,0 +1,10 @@ +public aspect MyAspect { + + pointcut mypointcut(): execution(* getName()) && !within(MyAspect); + + String around(): mypointcut() { + String w = proceed() + " and George"; + return w; + } + +} diff --git a/tests/bugs153/pr154054_2/src/MyClass.java b/tests/bugs153/pr154054_2/src/MyClass.java new file mode 100644 index 000000000..f0b28cb79 --- /dev/null +++ b/tests/bugs153/pr154054_2/src/MyClass.java @@ -0,0 +1,19 @@ +public class MyClass { + + String name; + + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public static void main(String[] args) { + MyClass m = new MyClass(); + m.setName("Fred"); + System.out.println(m.getName()); + } + +} |