diff options
Diffstat (limited to 'tests/new/NotAndPointcut.java')
-rw-r--r-- | tests/new/NotAndPointcut.java | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/new/NotAndPointcut.java b/tests/new/NotAndPointcut.java new file mode 100644 index 000000000..4dc0e48c9 --- /dev/null +++ b/tests/new/NotAndPointcut.java @@ -0,0 +1,22 @@ +import org.aspectj.testing.Tester; + +public class NotAndPointcut { + static String str = ""; + + public static void main(String args[]){ + new NotAndPointcut().showBug(); + Tester.checkEqual(str, "ran", "advice didn't run"); + } + + public void showBug(){ + } +} + +aspect BugInPCD { + pointcut p(): execution(* NotAndPointcut.showBug(..)) && + ! ( target(NotAndPointcut) && call(* NotAndPointcut.*(..))); + + before(): p(){ + NotAndPointcut.str += "ran"; + } +} |