summaryrefslogtreecommitdiffstats
path: root/tests/new/IfFalse.aj
blob: 6b1b8d40295aae22acfa4edc284bc00c7f6a9a05 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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) {}
}