From f4267ccd96a9143c910c66a5b0436aaa64b7c9dc Mon Sep 17 00:00:00 2001 From: Paul Phillips Date: Wed, 18 Sep 2013 00:09:46 -0700 Subject: Cull extraneous whitespace. One last flurry with the broom before I leave you slobs to code in your own filth. Eliminated all the trailing whitespace I could manage, with special prejudice reserved for the test cases which depended on the preservation of trailing whitespace. Was reminded I cannot figure out how to eliminate the trailing space on the "scala> " prompt in repl transcripts. At least reduced the number of such empty prompts by trimming transcript code on the way in. Routed ConsoleReporter's "printMessage" through a trailing whitespace stripping method which might help futureproof against the future of whitespace diseases. Deleted the up-to-40 lines of trailing whitespace found in various library files. It seems like only yesterday we performed whitespace surgery on the whole repo. Clearly it doesn't stick very well. I suggest it would work better to enforce a few requirements on the way in. --- test/files/run/tuple-zipped.scala | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'test/files/run/tuple-zipped.scala') diff --git a/test/files/run/tuple-zipped.scala b/test/files/run/tuple-zipped.scala index c8ba41f042..37ac52977f 100644 --- a/test/files/run/tuple-zipped.scala +++ b/test/files/run/tuple-zipped.scala @@ -11,32 +11,31 @@ object Test { val as1 = 1 to 100 toArray val as2 = as1.view val as3 = as1 take 10 - + def xss1 = List[Seq[Int]](xs1, xs2, xs3, ss1, ss2, ss3, as1, as2, as3) def xss2 = List[Seq[Int]](xs1, xs2, xs3, ss3, as1, as2, as3) // no infinities def xss3 = List[Seq[Int]](xs2, xs3, ss3, as1) // representative sampling - + def main(args: Array[String]): Unit = { for (cc1 <- xss1 ; cc2 <- xss2) { val sum1 = (cc1, cc2).zipped map { case (x, y) => x + y } sum val sum2 = (cc1, cc2).zipped map (_ + _) sum - + assert(sum1 == sum2) } - + for (cc1 <- xss1 ; cc2 <- xss2 ; cc3 <- xss3) { val sum1 = (cc1, cc2, cc3).zipped map { case (x, y, z) => x + y + z } sum val sum2 = (cc1, cc2, cc3).zipped map (_ + _ + _) sum - + assert(sum1 == sum2) } - + assert((ss1, ss1).zipped exists ((x, y) => true)) assert((ss1, ss1, ss1).zipped exists ((x, y, z) => true)) - + assert(!(ss1, ss2, 1 to 3).zipped.exists(_ + _ + _ > 100000)) assert((1 to 3, ss1, ss2).zipped.forall(_ + _ + _ > 0)) assert((ss1, 1 to 3, ss2).zipped.map(_ + _ + _).size == 3) } } - -- cgit v1.2.3