blob: 9349ca4b0d5c315efcc944fb340c73fdec4fab90 (
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;
public class Test {
public static void main(String[] arguments){
Test test = new Test();
Tester.checkEqual(TestAspect.sawDirectCall, false, "no calls");
test.doSayHello();
Tester.checkEqual(TestAspect.sawDirectCall, false, "non-cflow");
test.sayHello();
Tester.checkEqual(TestAspect.sawDirectCall, true, "in-cflow");
}
public void sayHello(){
doSayHello();
}
public void doSayHello(){
System.out.println("hello.");
}
}
|