aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/IfFalse.aj
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/IfFalse.aj')
-rw-r--r--tests/new/IfFalse.aj37
1 files changed, 37 insertions, 0 deletions
diff --git a/tests/new/IfFalse.aj b/tests/new/IfFalse.aj
new file mode 100644
index 000000000..6b1b8d402
--- /dev/null
+++ b/tests/new/IfFalse.aj
@@ -0,0 +1,37 @@
+import org.aspectj.testing.Tester;
+
+public aspect IfFalse {
+
+ private static boolean x = false;
+
+ pointcut p1() : if(false);
+
+ pointcut p2() : if( false );
+
+ pointcut p3() : if(x);
+
+ pointcut p4() : within(IfFalse) && if(false);
+
+
+ after() returning : p1() {
+ // should never get here
+ Tester.checkFailed("if(false) matched!");
+ }
+
+ after() returning : p2() {
+ // should never get here
+ Tester.checkFailed("if( false ) matched!");
+ }
+
+ after() returning : p3() {
+ // should never get here
+ Tester.checkFailed("if(x) matched!");
+ }
+
+ after() returning : p4() {
+ // should never get here
+ Tester.checkFailed("if(false) matched!");
+ }
+
+ public static void main(String[] args) {}
+} \ No newline at end of file