From 8dc8d1e0b897d9ab515ed3d99abaee930b45c9d5 Mon Sep 17 00:00:00 2001 From: Andy Clement Date: Wed, 23 Jan 2013 13:25:49 -0800 Subject: more changes to make if point cut generated names stable --- tests/bugs172/pr398246/Code5.java | 20 ++++++++++++++++++++ tests/bugs172/pr398246/Code5a.java | 25 +++++++++++++++++++++++++ tests/bugs172/pr398246/Code6.java | 22 ++++++++++++++++++++++ tests/bugs172/pr398246/Code7.java | 20 ++++++++++++++++++++ 4 files changed, 87 insertions(+) create mode 100644 tests/bugs172/pr398246/Code5.java create mode 100644 tests/bugs172/pr398246/Code5a.java create mode 100644 tests/bugs172/pr398246/Code6.java create mode 100644 tests/bugs172/pr398246/Code7.java (limited to 'tests/bugs172') diff --git a/tests/bugs172/pr398246/Code5.java b/tests/bugs172/pr398246/Code5.java new file mode 100644 index 000000000..50512d496 --- /dev/null +++ b/tests/bugs172/pr398246/Code5.java @@ -0,0 +1,20 @@ +import java.lang.annotation.*; + +public class Code5 { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code5().m(); + } +} + +aspect X { + + pointcut p(): execution(* Code*.*(..)) && if(Code5.isTrue); + + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code5a.java b/tests/bugs172/pr398246/Code5a.java new file mode 100644 index 000000000..0f5562640 --- /dev/null +++ b/tests/bugs172/pr398246/Code5a.java @@ -0,0 +1,25 @@ +import java.lang.annotation.*; + +public class Code5a { + public static boolean isTrue = true; + + public void m() { + } + public static void main(String []argv) { + new Code5a().m(); + } +} + + +// more white space, on purpose + + + +aspect X2 { + + + pointcut p(): execution(* Code*.*(..)) && if(Code5.isTrue); + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code6.java b/tests/bugs172/pr398246/Code6.java new file mode 100644 index 000000000..e032eb7c9 --- /dev/null +++ b/tests/bugs172/pr398246/Code6.java @@ -0,0 +1,22 @@ +import java.lang.annotation.*; + +public class Code6 { + public static boolean isTrue = true; + public static boolean isTrue2 = true; + + public void m() { + } + + public static void main(String []argv) { + new Code6().m(); + } +} + +aspect X { + + pointcut p(): execution(* Code*.*(..)) && if(Code6.isTrue) && if(Code6.isTrue2); + + before(): p() { + System.out.println("advice"); + } +} diff --git a/tests/bugs172/pr398246/Code7.java b/tests/bugs172/pr398246/Code7.java new file mode 100644 index 000000000..e8d47a5a1 --- /dev/null +++ b/tests/bugs172/pr398246/Code7.java @@ -0,0 +1,20 @@ +import java.lang.annotation.*; + +public class Code7 { + public static boolean isTrue = true; + public static boolean isTrue2 = true; + + public void m() { + } + + public static void main(String []argv) { + new Code7().m(); + } +} + +aspect X { + + before(): execution(* Code*.*(..)) && if(Code7.isTrue) && if(Code7.isTrue2) { + System.out.println("advice"); + } +} -- cgit v1.2.3