aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillaume Martres <smarter@ubuntu.com>2016-06-03 01:28:56 +0200
committerGuillaume Martres <smarter@ubuntu.com>2016-06-30 01:36:56 +0100
commit00159e64977ff72b6b51f9bb26a950ac4b04b49b (patch)
tree68cf672f2b82292657f69460bd6935b6a15e4cea
parent66572df759de0e8b25cbfeb0fcac270bb011658a (diff)
downloaddotty-00159e64977ff72b6b51f9bb26a950ac4b04b49b.tar.gz
dotty-00159e64977ff72b6b51f9bb26a950ac4b04b49b.tar.bz2
dotty-00159e64977ff72b6b51f9bb26a950ac4b04b49b.zip
partest: correct line numbers in run stack traces
partest adds a warning in a comment at the beginning of source files that it copies, but this means that every line number displayed in a stack trace is offset by 6. We can workaround this by making the warning a single line with no newline at the end.
-rw-r--r--test/test/CompilerTest.scala8
-rw-r--r--tests/run/origins.check6
2 files changed, 5 insertions, 9 deletions
diff --git a/test/test/CompilerTest.scala b/test/test/CompilerTest.scala
index 995244986..1977d21e0 100644
--- a/test/test/CompilerTest.scala
+++ b/test/test/CompilerTest.scala
@@ -438,12 +438,8 @@ abstract class CompilerTest {
processFileDir(sourceFile, { sf =>
if (extensionsToCopy.contains(sf.extension)) {
dest.parent.jfile.mkdirs
- dest.toFile.writeAll("/* ==========================================\n",
- " * ========= AUTOMATICALLY GENERATED ========\n",
- " * ========= DO NOT EDIT THIS FILE ==========\n",
- " * ==========================================\n",
- " * Original: " + sf.toString + " */\n\n",
- sf.slurp())
+ dest.toFile.writeAll("/* !!!!! WARNING: DO NOT MODIFY. Original is at: $sf !!!!! */",
+ sf.slurp())
} else {
log(s"WARNING: ignoring $sf")
}
diff --git a/tests/run/origins.check b/tests/run/origins.check
index db9bf29a4..54d58296b 100644
--- a/tests/run/origins.check
+++ b/tests/run/origins.check
@@ -1,6 +1,6 @@
>> Origins tag 'boop' logged 65 calls from 3 distinguished sources.
- 50 Test$.$anonfun$f3$1(origins.scala:22)
- 10 Test$.$anonfun$f2$1(origins.scala:21)
- 5 Test$.$anonfun$f1$1(origins.scala:20)
+ 50 Test$.$anonfun$f3$1(origins.scala:16)
+ 10 Test$.$anonfun$f2$1(origins.scala:15)
+ 5 Test$.$anonfun$f1$1(origins.scala:14)