summaryrefslogtreecommitdiff
path: root/test/files/presentation
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-18 00:09:46 -0700
committerPaul Phillips <paulp@improving.org>2013-09-18 07:13:38 -0700
commitf4267ccd96a9143c910c66a5b0436aaa64b7c9dc (patch)
tree174861715807c23ba332f78769a9f7e1377b7f02 /test/files/presentation
parentd45a3c8cc8e9f1d95d797d548a85abd8597f5bc7 (diff)
downloadscala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.gz
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.tar.bz2
scala-f4267ccd96a9143c910c66a5b0436aaa64b7c9dc.zip
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.
Diffstat (limited to 'test/files/presentation')
-rw-r--r--test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala4
-rw-r--r--test/files/presentation/hyperlinks/Runner.scala2
-rw-r--r--test/files/presentation/hyperlinks/src/NameDefaultTests.scala6
-rw-r--r--test/files/presentation/hyperlinks/src/PatMatTests.scala8
-rw-r--r--test/files/presentation/ide-bug-1000475/src/Foo.scala2
-rw-r--r--test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala4
-rw-r--r--test/files/presentation/ide-t1001326/Test.scala24
-rw-r--r--test/files/presentation/implicit-member/src/ImplicitMember.scala4
-rw-r--r--test/files/presentation/ping-pong/src/PingPong.scala14
-rw-r--r--test/files/presentation/random/src/Random.scala16
-rw-r--r--test/files/presentation/visibility/src/Completions.scala2
11 files changed, 43 insertions, 43 deletions
diff --git a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
index 0e96dfaa05..ce3b996b96 100644
--- a/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
+++ b/test/files/presentation/callcc-interpreter/src/CallccInterpreter.scala
@@ -2,8 +2,8 @@ object callccInterpreter {
type Answer = Value
- /**
- * A continuation monad.
+ /**
+ * A continuation monad.
*/
case class M[A](in: (A => Answer) => Answer) {
def bind[B](k: A => M[B]) = M[B](c => in (a => k(a) in c))
diff --git a/test/files/presentation/hyperlinks/Runner.scala b/test/files/presentation/hyperlinks/Runner.scala
index 61da49a3d7..b78e13c23a 100644
--- a/test/files/presentation/hyperlinks/Runner.scala
+++ b/test/files/presentation/hyperlinks/Runner.scala
@@ -7,5 +7,5 @@ object Test extends InteractiveTest {
sourceFiles foreach (src => askLoadedTyped(src).get)
super.runDefaultTests()
}
-
+
} \ No newline at end of file
diff --git a/test/files/presentation/hyperlinks/src/NameDefaultTests.scala b/test/files/presentation/hyperlinks/src/NameDefaultTests.scala
index b218040fe3..340d223d2e 100644
--- a/test/files/presentation/hyperlinks/src/NameDefaultTests.scala
+++ b/test/files/presentation/hyperlinks/src/NameDefaultTests.scala
@@ -2,11 +2,11 @@
class NameDefaults {
val someString = "abc"
val someInt = 42
-
+
def foo(x: String, y: Int)(implicit logger: Int): Int = y
-
+
implicit val l = 42
-
+
def bar {
println()
val someOtherInt = 10
diff --git a/test/files/presentation/hyperlinks/src/PatMatTests.scala b/test/files/presentation/hyperlinks/src/PatMatTests.scala
index bbd0f2e7ed..7184106357 100644
--- a/test/files/presentation/hyperlinks/src/PatMatTests.scala
+++ b/test/files/presentation/hyperlinks/src/PatMatTests.scala
@@ -6,22 +6,22 @@ case class CaseOne(x: Int, y: List[Int]) extends BaseType
case class CaseTwo(str: String) extends BaseType
class PatMatTests {
-
+
def foo(x: BaseType) {
x match {
case CaseOne/*#*/(10, first :: second :: Nil) =>
val tmp = 23
println(first/*#*/)
println(tmp/*#*/)
-
+
case CaseTwo/*#*/(mystring) =>
println(mystring/*#*/)
}
}
-
+
def multipleAssign() {
val (x, y) = ("abc", "def")
-
+
println(x/*#*/, y/*#*/)
}
diff --git a/test/files/presentation/ide-bug-1000475/src/Foo.scala b/test/files/presentation/ide-bug-1000475/src/Foo.scala
index b963bb7a88..5dd6b7d00d 100644
--- a/test/files/presentation/ide-bug-1000475/src/Foo.scala
+++ b/test/files/presentation/ide-bug-1000475/src/Foo.scala
@@ -1,7 +1,7 @@
class Foo {
val v = new Object
v.toS/*!*/
-
+
val m = Map(1 -> new Object)
m(1).toS/*!*/
m(1)./*!*/
diff --git a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
index 21d39c8923..878bbfa19e 100644
--- a/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
+++ b/test/files/presentation/ide-bug-1000531/src/CrashOnLoad.scala
@@ -1,7 +1,7 @@
/** When this files is opened within the IDE, a typing error is reported. */
class A[B] extends java.lang.Iterable[B] {
import scala.collection.JavaConversions._
- def iterator = Iterator.empty
-
+ def iterator = Iterator.empty
+
iterator. /*!*/
} \ No newline at end of file
diff --git a/test/files/presentation/ide-t1001326/Test.scala b/test/files/presentation/ide-t1001326/Test.scala
index 3091da4b40..ff63b9770a 100644
--- a/test/files/presentation/ide-t1001326/Test.scala
+++ b/test/files/presentation/ide-t1001326/Test.scala
@@ -3,7 +3,7 @@ import scala.reflect.internal.util.SourceFile
import scala.tools.nsc.interactive.Response
object Test extends InteractiveTest {
-
+
override def execute(): Unit = {
val sf = sourceFiles.find(_.file.name == "A.scala").head
uniqueParseTree_t1001326(sf)
@@ -11,7 +11,7 @@ object Test extends InteractiveTest {
neverModifyParseTree_t1001326(sf)
shouldAlwaysReturnParseTree_t1001326(sf)
}
-
+
/**
* Asking twice for a parseTree on the same source should always return a new tree
*/
@@ -24,7 +24,7 @@ object Test extends InteractiveTest {
reporter.println("Unique FAILED")
}
}
-
+
/**
* A parseTree should never contain any symbols or types
*/
@@ -35,10 +35,10 @@ object Test extends InteractiveTest {
reporter.println("Unattributed FAILED")
}
}
-
+
/**
* Once you have obtained a parseTree it should never change
- */
+ */
private def neverModifyParseTree_t1001326(sf: SourceFile) {
val parsedTree = compiler.parseTree(sf)
loadSourceAndWaitUntilTypechecked(sf)
@@ -48,7 +48,7 @@ object Test extends InteractiveTest {
reporter.println("NeverModify FAILED")
}
}
-
+
/**
* Should always return a parse tree
*/
@@ -60,7 +60,7 @@ object Test extends InteractiveTest {
reporter.println("AlwaysParseTree FAILED")
}
}
-
+
/**
* Load a source and block while it is type-checking.
*/
@@ -71,7 +71,7 @@ object Test extends InteractiveTest {
res.get
askLoadedTyped(sf).get
}
-
+
/**
* Traverses a tree and makes sure that there are no types or symbols present in the tree with
* the exception of the symbol for the package 'scala'. This is because that symbol will be
@@ -79,13 +79,13 @@ object Test extends InteractiveTest {
*/
private def noSymbolsOrTypes(tree: compiler.Tree): Boolean = {
tree.forAll { t =>
- (t.symbol == null ||
- t.symbol == compiler.NoSymbol ||
+ (t.symbol == null ||
+ t.symbol == compiler.NoSymbol ||
t.symbol == compiler.definitions.ScalaPackage // ignore the symbol for the scala package for now
) && (
- t.tpe == null ||
+ t.tpe == null ||
t.tpe == compiler.NoType)
}
}
-
+
} \ No newline at end of file
diff --git a/test/files/presentation/implicit-member/src/ImplicitMember.scala b/test/files/presentation/implicit-member/src/ImplicitMember.scala
index 06732f6dc6..a547b65a8e 100644
--- a/test/files/presentation/implicit-member/src/ImplicitMember.scala
+++ b/test/files/presentation/implicit-member/src/ImplicitMember.scala
@@ -1,8 +1,8 @@
object Implicit {
final class AppliedImplicit[A](val x: A)
-
+
implicit def AppliedImplicit[A](x: A): AppliedImplicit[A] = new AppliedImplicit(x)
-
+
this./*!*/x
} \ No newline at end of file
diff --git a/test/files/presentation/ping-pong/src/PingPong.scala b/test/files/presentation/ping-pong/src/PingPong.scala
index 08bb4e3f2d..94f52c4658 100644
--- a/test/files/presentation/ping-pong/src/PingPong.scala
+++ b/test/files/presentation/ping-pong/src/PingPong.scala
@@ -2,21 +2,21 @@
class Ping {
val pong = new Pong(this)
-
+
def name = "ping"
- def loop/*?*/ { poke() }
-
+ def loop/*?*/ { poke() }
+
def poke/*?*/ { pong./*!*/poke() }
-
- override def toString = name
+
+ override def toString = name
}
class Pong(ping: Ping) {
val name/*?*/ = "pong"
-
+
def poke() { ping./*!*/poke() }
-
+
override def toString = name
} \ No newline at end of file
diff --git a/test/files/presentation/random/src/Random.scala b/test/files/presentation/random/src/Random.scala
index 4fff783fa4..af76a28f47 100644
--- a/test/files/presentation/random/src/Random.scala
+++ b/test/files/presentation/random/src/Random.scala
@@ -4,16 +4,16 @@ import java.io._
import java.net.{InetAddress,ServerSocket,Socket,SocketException}
import java.util.Random
-/**
- * Simple client/server application using Java sockets.
- *
- * The server simply generates random integer values and
- * the clients provide a filter function to the server
- * to get only values they interested in (eg. even or
- * odd values, and so on).
+/**
+ * Simple client/server application using Java sockets.
+ *
+ * The server simply generates random integer values and
+ * the clients provide a filter function to the server
+ * to get only values they interested in (eg. even or
+ * odd values, and so on).
*/
object randomclient {
-
+
def main(args: Array[String]) {
val filter/*?*/ = try {
Integer.parseInt(args(0)/*?*/) match {
diff --git a/test/files/presentation/visibility/src/Completions.scala b/test/files/presentation/visibility/src/Completions.scala
index 098b98a0fd..8c07934915 100644
--- a/test/files/presentation/visibility/src/Completions.scala
+++ b/test/files/presentation/visibility/src/Completions.scala
@@ -22,7 +22,7 @@ package accessibility {
this./*!*/ // should not list secretPrivate*
}
}
-
+
class UnrelatedClass {
def someTests(foo: Foo) {
foo./*!*/ // should list public and protected[accessiblity]