From 4d1c9e2212d8d462ad8664904491c378766a65fa Mon Sep 17 00:00:00 2001 From: Dmitry Petrashko Date: Thu, 9 Apr 2015 16:58:43 +0200 Subject: Remove trailing spaces in Dotty tests. --- tests/pickling/Coder.scala | 14 +++++++------- tests/pickling/Labels.scala | 8 ++++---- tests/pickling/nameddefaults.scala | 16 ++++++++-------- tests/pickling/selftypes.scala | 18 +++++++++--------- 4 files changed, 28 insertions(+), 28 deletions(-) (limited to 'tests/pickling') diff --git a/tests/pickling/Coder.scala b/tests/pickling/Coder.scala index 77bbd134c..6eb1ad55a 100644 --- a/tests/pickling/Coder.scala +++ b/tests/pickling/Coder.scala @@ -7,15 +7,15 @@ class Coder(words: List[String]) { private val mnemonics = Map( '2' -> "ABC", '3' -> "DEF", '4' -> "GHI", '5' -> "JKL", '6' -> "MNO", '7' -> "PQRS", '8' -> "TUV", '9' -> "WXYZ") - + ('1', "1") match { - case (digit, str) => true + case (digit, str) => true case _ => false } /** Invert the mnemonics map to give a map from chars 'A' ... 'Z' to '2' ... '9' */ - private val charCode0: Map[Char, Char] = mnemonics withFilter { + private val charCode0: Map[Char, Char] = mnemonics withFilter { case (digit, str) => true case _ => false } flatMap { x$1 => @@ -24,18 +24,18 @@ class Coder(words: List[String]) { } } - private val charCode: Map[Char, Char] = + private val charCode: Map[Char, Char] = for ((digit, str) <- mnemonics; ltr <- str) yield ltr -> digit /** Maps a word to the digit string it can represent */ private def wordCode(word: String): String = word map charCode /** A map from digit strings to the words that represent them */ - private val wordsForNum: Map[String, List[String]] = + private val wordsForNum: Map[String, List[String]] = words groupBy wordCode withDefaultValue Nil /** All ways to encode a number as a list of words */ - def encode(number: String): Set[List[String]] = + def encode(number: String): Set[List[String]] = if (number.isEmpty) Set(Nil) else { for { @@ -44,7 +44,7 @@ class Coder(words: List[String]) { rest <- encode(number drop splitPoint) } yield word :: rest }.toSet - + /** Maps a number to a list of all word phrases that can represent it */ def translate(number: String): Set[String] = encode(number) map (_ mkString " ") diff --git a/tests/pickling/Labels.scala b/tests/pickling/Labels.scala index 4a84175af..4373723a8 100644 --- a/tests/pickling/Labels.scala +++ b/tests/pickling/Labels.scala @@ -1,18 +1,18 @@ object Labels { def main(args: Array[String]): Unit = { var i = 10 - while(i>0) { + while(i>0) { var j = 0 while(j0) => println("one") case t@2 => println("two" + t) diff --git a/tests/pickling/nameddefaults.scala b/tests/pickling/nameddefaults.scala index 671f14a07..20a0eae47 100644 --- a/tests/pickling/nameddefaults.scala +++ b/tests/pickling/nameddefaults.scala @@ -1,7 +1,7 @@ object nameddefaults { def foo(first: Int, second: Int = 2, third: Int = 3) = first + second - + var x = 1 var y = 2 @@ -12,7 +12,7 @@ object nameddefaults { foo(1) // named and missing arguments - + foo(first = 1, second = 3) foo(second = 3, first = 1) @@ -20,7 +20,7 @@ object nameddefaults { foo(first = 2, third = 3) foo(2, third = 3) - + // same but with non-idempotent expressions foo(first = x, second = y) @@ -30,11 +30,11 @@ object nameddefaults { foo(first = x, third = y) foo(x, third = y) - + // The same thing, but for classes - + class C(first: Int, second: Int = 2, third: Int = 3) {} - + new C(1, 2, 3) new C(1, 2) @@ -42,7 +42,7 @@ object nameddefaults { new C(1) // named and missing arguments - + new C(first = 1, second = 3) new C(second = 3, first = 1) @@ -50,7 +50,7 @@ object nameddefaults { new C(first = 2, third = 3) new C(2, third = 3) - + // same but with non-idempotent expressions new C(first = x, second = y) diff --git a/tests/pickling/selftypes.scala b/tests/pickling/selftypes.scala index 4bd0dd752..5180419d1 100644 --- a/tests/pickling/selftypes.scala +++ b/tests/pickling/selftypes.scala @@ -1,20 +1,20 @@ object selftypes { - + trait A { self: AB => - + type AA = List[this.BX] - + class AX - + } - + trait B { self: AB => - + type BB = AA - + class BX } - + class AB extends A with B -} +} -- cgit v1.2.3