Skip to content

Commit 029c6aa

Browse files
committed
Improve formatting
1 parent e34555f commit 029c6aa

File tree

1 file changed

+19
-14
lines changed

1 file changed

+19
-14
lines changed

compiler/test/dotty/tools/dotc/CompilerTest.scala

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -397,20 +397,25 @@ abstract class CompilerTest {
397397
/** Gives an error message for one line where the expected number of errors and
398398
* the number of compiler errors differ. */
399399
def compareLines(fileName: String, expectedLines: List[(Int, Int)], foundLines: List[(Int, Int)]) = {
400-
expectedLines.foreach({ case (line, expNr) =>
401-
foundLines.find(_._1 == line) match {
402-
case Some((_, `expNr`)) => // this line is ok
403-
case Some((_, foundNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
404-
case None => errorMsg(fileName, Some(line), expNr, 0)
405-
}
406-
})
407-
foundLines.foreach({ case (line, foundNr) =>
408-
expectedLines.find(_._1 == line) match {
409-
case Some((_, `foundNr`)) => // this line is ok
410-
case Some((_, expNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
411-
case None => errorMsg(fileName, Some(line), 0, foundNr)
412-
}
413-
})
400+
expectedLines foreach{
401+
case (line, expNr) =>
402+
foundLines.find(_._1 == line) match {
403+
case Some((_, `expNr`)) => // this line is ok
404+
case Some((_, foundNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
405+
case None =>
406+
println(s"expected lines = $expectedLines%, %")
407+
println(s"found lines = $foundLines%, %")
408+
errorMsg(fileName, Some(line), expNr, 0)
409+
}
410+
}
411+
foundLines foreach {
412+
case (line, foundNr) =>
413+
expectedLines.find(_._1 == line) match {
414+
case Some((_, `foundNr`)) => // this line is ok
415+
case Some((_, expNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
416+
case None => errorMsg(fileName, Some(line), 0, foundNr)
417+
}
418+
}
414419
}
415420

416421
// ========== PARTEST HELPERS =============

0 commit comments

Comments
 (0)