aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/CompilerTest.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2017-02-01 17:48:58 +1100
committerMartin Odersky <odersky@gmail.com>2017-02-01 17:48:58 +1100
commit029c6aa106c5a8e91d2f75421ce20ee87ff1b8f8 (patch)
tree58af3a310f0464ffe4241b8018d6ddb588ad034e /compiler/test/dotty/tools/dotc/CompilerTest.scala
parente34555f69e7cdd6d19d0d1ed969127f4ee65c36e (diff)
downloaddotty-029c6aa106c5a8e91d2f75421ce20ee87ff1b8f8.tar.gz
dotty-029c6aa106c5a8e91d2f75421ce20ee87ff1b8f8.tar.bz2
dotty-029c6aa106c5a8e91d2f75421ce20ee87ff1b8f8.zip
Improve formatting
Diffstat (limited to 'compiler/test/dotty/tools/dotc/CompilerTest.scala')
-rw-r--r--compiler/test/dotty/tools/dotc/CompilerTest.scala33
1 files changed, 19 insertions, 14 deletions
diff --git a/compiler/test/dotty/tools/dotc/CompilerTest.scala b/compiler/test/dotty/tools/dotc/CompilerTest.scala
index eaa0bea84..5d16917cc 100644
--- a/compiler/test/dotty/tools/dotc/CompilerTest.scala
+++ b/compiler/test/dotty/tools/dotc/CompilerTest.scala
@@ -397,20 +397,25 @@ abstract class CompilerTest {
/** Gives an error message for one line where the expected number of errors and
* the number of compiler errors differ. */
def compareLines(fileName: String, expectedLines: List[(Int, Int)], foundLines: List[(Int, Int)]) = {
- expectedLines.foreach({ case (line, expNr) =>
- foundLines.find(_._1 == line) match {
- case Some((_, `expNr`)) => // this line is ok
- case Some((_, foundNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
- case None => errorMsg(fileName, Some(line), expNr, 0)
- }
- })
- foundLines.foreach({ case (line, foundNr) =>
- expectedLines.find(_._1 == line) match {
- case Some((_, `foundNr`)) => // this line is ok
- case Some((_, expNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
- case None => errorMsg(fileName, Some(line), 0, foundNr)
- }
- })
+ expectedLines foreach{
+ case (line, expNr) =>
+ foundLines.find(_._1 == line) match {
+ case Some((_, `expNr`)) => // this line is ok
+ case Some((_, foundNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
+ case None =>
+ println(s"expected lines = $expectedLines%, %")
+ println(s"found lines = $foundLines%, %")
+ errorMsg(fileName, Some(line), expNr, 0)
+ }
+ }
+ foundLines foreach {
+ case (line, foundNr) =>
+ expectedLines.find(_._1 == line) match {
+ case Some((_, `foundNr`)) => // this line is ok
+ case Some((_, expNr)) => errorMsg(fileName, Some(line), expNr, foundNr)
+ case None => errorMsg(fileName, Some(line), 0, foundNr)
+ }
+ }
}
// ========== PARTEST HELPERS =============