Skip to content

Commit 53d4182

Browse files
author
Lucy Martin
committed
Correcting the error number in expected messages.
1 parent 954ef31 commit 53d4182

File tree

3 files changed

+14
-6
lines changed

3 files changed

+14
-6
lines changed

compiler/test/dotty/tools/vulpix/FileDiff.scala

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,18 @@ object FileDiff {
2828
if (!(new File(checkFile)).exists) Nil
2929
else Using(Source.fromFile(checkFile, StandardCharsets.UTF_8.name))(_.getLines().toList).get
3030

31-
if (!matches(outputLines, checkLines)) Some(
32-
s"""|Output from '$sourceTitle' did not match check file. Actual output:
33-
|${outputLines.mkString(EOL)}
34-
|""".stripMargin + "\n")
31+
if (!matches(outputLines, checkLines)) {
32+
Some(
33+
s"""|Output from '$sourceTitle' did not match check file. Actual output:
34+
|${outputLines.mkString(EOL)}
35+
|
36+
|Output
37+
|${outputLines.map(s => s.stripLineEnd.toList.map(_.toInt.toHexString).mkString(" ")).mkString("\n")}
38+
|
39+
|Check
40+
|${checkLines.map(s => s.stripLineEnd.toList.map(_.toInt.toHexString).mkString(" ")).mkString("\n")}
41+
|""".stripMargin + "\n")
42+
}
3543
else None
3644
}
3745

tests/neg/i20105.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- [E195] Syntax Warning: tests\neg\i20105.scala:6:9 -------------------------------------------------------------------
1+
-- [E199] Syntax Warning: tests\neg\i20105.scala:6:9 -------------------------------------------------------------------
22
6 | foo()
33
| ^^^^^
44
| The tail recursive def foo contains a recursive call inside the non-inlined inner def bar

tests/warn/i20105.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
-- [E195] Syntax Warning: tests\warn\i20105.scala:6:9 ------------------------------------------------------------------
1+
-- [E199] Syntax Warning: tests\warn\i20105.scala:6:9 ------------------------------------------------------------------
22
6 | foo() // warn
33
| ^^^^^
44
| The tail recursive def foo contains a recursive call inside the non-inlined inner def bar

0 commit comments

Comments
 (0)