aboutsummaryrefslogtreecommitdiffstats
path: root/tests/new/SourceLocationToString.java
diff options
context:
space:
mode:
Diffstat (limited to 'tests/new/SourceLocationToString.java')
-rw-r--r--tests/new/SourceLocationToString.java29
1 files changed, 29 insertions, 0 deletions
diff --git a/tests/new/SourceLocationToString.java b/tests/new/SourceLocationToString.java
new file mode 100644
index 000000000..143dd0c70
--- /dev/null
+++ b/tests/new/SourceLocationToString.java
@@ -0,0 +1,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 + "\"");
+ }
+ }
+
+}
+