blob: 143dd0c70236ef7a680ba8fa8d1087eda4f5f26e (
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
|
import org.aspectj.testing.*;
import org.aspectj.lang.*;
/** @rfe our SourceLocation implementation should implement toString as filename:column */
public class SourceLocationToString {
public static final String EXPECT = "SourceLocationToString.java:9";
public static void main (String[] args) {
docall(); // line 9
Tester.checkAllEvents();
}
static {
Tester.expectEvent("docall");
}
static void docall() {
Tester.event("docall");
}
static aspect A {
before () : call(void docall()) {
Tester.event("before");
String sl = thisJoinPoint.getSourceLocation().toString();
Tester.check(sl.endsWith(EXPECT),
"sl=\"" + sl + "\" did not end with \""
+ EXPECT + "\"");
}
}
}
|