diff options
author | aclement <aclement> | 2007-11-08 08:59:04 +0000 |
---|---|---|
committer | aclement <aclement> | 2007-11-08 08:59:04 +0000 |
commit | 4becbd27f0dcf9bf8ebeb7aa3788362dc62a09cb (patch) | |
tree | 5ec63a026b0f22d61df9d5ba036626f21a7f6ba3 /tests/bugs154 | |
parent | 20c4e096716f935fdcf8b5d42135a9b101480a82 (diff) | |
download | aspectj-4becbd27f0dcf9bf8ebeb7aa3788362dc62a09cb.tar.gz aspectj-4becbd27f0dcf9bf8ebeb7aa3788362dc62a09cb.zip |
testcode for 209051
Diffstat (limited to 'tests/bugs154')
-rw-r--r-- | tests/bugs154/pr209051/Bug.java | 21 | ||||
-rw-r--r-- | tests/bugs154/pr209051/Bug2.java | 10 |
2 files changed, 31 insertions, 0 deletions
diff --git a/tests/bugs154/pr209051/Bug.java b/tests/bugs154/pr209051/Bug.java new file mode 100644 index 000000000..ac1bf7b8e --- /dev/null +++ b/tests/bugs154/pr209051/Bug.java @@ -0,0 +1,21 @@ +import org.aspectj.lang.annotation.*; + +public @Aspect class Bug { + @Pointcut("args(i) && if() && within(Foo)") + public static boolean pc(int i) { + return i < 0; + } + + @Before("pc(*)") + public void advice() { System.out.println("advice running");} + + public static void main(String []argv) { + new Foo().trigger(-1); + new Foo().trigger(+1); + } +} + +class Foo { + public void trigger(int i) {} +} + diff --git a/tests/bugs154/pr209051/Bug2.java b/tests/bugs154/pr209051/Bug2.java new file mode 100644 index 000000000..b37a3478b --- /dev/null +++ b/tests/bugs154/pr209051/Bug2.java @@ -0,0 +1,10 @@ +import org.aspectj.lang.annotation.*; + +public aspect Bug2 { + pointcut pc(int i): args(i) && if(i<0); + + before(): pc(*) { + } + + public void trigger(int i) {} +} |