aboutsummaryrefslogtreecommitdiffstats
path: root/tests/bugs/ExecutionCflow.java
blob: ac72b44a471058d214c04f3850cbd3365824832c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import org.aspectj.testing.Tester;
import java.util.*;

/** @testcase PR#903 cflow of execution */
public class ExecutionCflow {

	static int field;
	
    public static void main(String[] args) {
		field = 0;
		Tester.expectEvent("before");
		Tester.checkAllEvents();
    }
}

aspect A {
    before() : cflow(execution(static void main(String[]))) 
    	&& set(int field) {
		Tester.event("before");
    }
}