aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs164
diff options
context:
space:
mode:
authoraclement <aclement>2009-02-25 20:11:16 +0000
committeraclement <aclement>2009-02-25 20:11:16 +0000
commitcf9a42e2c35699ae328a9066665c7e8c55617e2f (patch)
tree02456c183675159f8bedd2926f80802cf7a6af6b /tests/bugs164
parent17229916f59b8eb79af2f2e930cdd529520f5341 (diff)
downloadaspectj-cf9a42e2c35699ae328a9066665c7e8c55617e2f.tar.gz
aspectj-cf9a42e2c35699ae328a9066665c7e8c55617e2f.zip
266165: if(enabled) where enabled is constant boolean is optimized
Diffstat (limited to 'tests/bugs164')
-rw-r--r--tests/bugs164/pr266165/AlwaysWeave.java11
-rw-r--r--tests/bugs164/pr266165/AlwaysWeave2.java10
-rw-r--r--tests/bugs164/pr266165/NeverWeave.java11
-rw-r--r--tests/bugs164/pr266165/NeverWeave2.java9
4 files changed, 41 insertions, 0 deletions
diff --git a/tests/bugs164/pr266165/AlwaysWeave.java b/tests/bugs164/pr266165/AlwaysWeave.java
new file mode 100644
index 000000000..2e8ba650a
--- /dev/null
+++ b/tests/bugs164/pr266165/AlwaysWeave.java
@@ -0,0 +1,11 @@
+aspect A {
+
+ public static final boolean enabled = true;
+
+ before(): execution(* AlwaysWeave.*(..)) && if(enabled) {}
+
+}
+
+public class AlwaysWeave {
+ public void foo() {}
+}
diff --git a/tests/bugs164/pr266165/AlwaysWeave2.java b/tests/bugs164/pr266165/AlwaysWeave2.java
new file mode 100644
index 000000000..3c158f59f
--- /dev/null
+++ b/tests/bugs164/pr266165/AlwaysWeave2.java
@@ -0,0 +1,10 @@
+aspect A {
+
+
+ before(): execution(* AlwaysWeave2.*(..)) && if(true) {}
+
+}
+
+public class AlwaysWeave2 {
+ public void foo() {}
+}
diff --git a/tests/bugs164/pr266165/NeverWeave.java b/tests/bugs164/pr266165/NeverWeave.java
new file mode 100644
index 000000000..85f5bbcd6
--- /dev/null
+++ b/tests/bugs164/pr266165/NeverWeave.java
@@ -0,0 +1,11 @@
+aspect A {
+
+ public static final boolean enabled = false;
+
+ before(): execution(* NeverWeave.*(..)) && if(enabled) {}
+
+}
+
+public class NeverWeave {
+ public void foo() {}
+}
diff --git a/tests/bugs164/pr266165/NeverWeave2.java b/tests/bugs164/pr266165/NeverWeave2.java
new file mode 100644
index 000000000..4b77a1b29
--- /dev/null
+++ b/tests/bugs164/pr266165/NeverWeave2.java
@@ -0,0 +1,9 @@
+aspect A {
+
+ before(): execution(* NeverWeave2.*(..)) && if(false) {}
+
+}
+
+public class NeverWeave2 {
+ public void foo() {}
+}