Skip to content

Commit bc348ca

Browse files
committed
Make verifyOutput print the complete diff
1 parent e099f31 commit bc348ca

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -500,8 +500,8 @@ trait ParallelTesting extends RunnerOrchestration { self =>
500500
else runMain(testSource.runClassPath) match {
501501
case Success(_) if !checkFile.isDefined || !checkFile.get.exists => // success!
502502
case Success(output) => {
503-
val outputLines = output.lines.toArray
504-
val checkLines: Array[String] = Source.fromFile(checkFile.get).getLines().toArray
503+
val outputLines = output.lines.toArray :+ DiffUtil.EOF
504+
val checkLines: Array[String] = Source.fromFile(checkFile.get).getLines().toArray :+ DiffUtil.EOF
505505
val sourceTitle = testSource.title
506506

507507
def linesMatch =
@@ -512,7 +512,7 @@ trait ParallelTesting extends RunnerOrchestration { self =>
512512
if (outputLines.length != checkLines.length || !linesMatch) {
513513
// Print diff to files and summary:
514514
val expectedSize = DiffUtil.EOF.length max outputLines.map(_.length).max
515-
val diff = (outputLines :+ DiffUtil.EOF).zip(checkLines :+ DiffUtil.EOF).map { case (act, exp) =>
515+
val diff = outputLines.padTo(checkLines.length, "").zip(checkLines.padTo(outputLines.length, "")).map { case (act, exp) =>
516516
DiffUtil.mkColoredLineDiff(exp, act, expectedSize)
517517
}.mkString("\n")
518518

0 commit comments

Comments
 (0)