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