summaryrefslogtreecommitdiff
path: root/test/files/run/t5986.scala
diff options
context:
space:
mode:
authorJason Zaugg <jzaugg@gmail.com>2013-09-18 09:01:51 -0700
committerJason Zaugg <jzaugg@gmail.com>2013-09-18 09:01:51 -0700
commitc5fdc815c30f0565a80a3837f368717a4e81e04d (patch)
tree48d2fc9de28b359fa9ef479e78388b9778f4ef52 /test/files/run/t5986.scala
parent42151a9980be37eae6e8fdf40330070361fd88fd (diff)
parentf4267ccd96a9143c910c66a5b0436aaa64b7c9dc (diff)
downloadscala-c5fdc815c30f0565a80a3837f368717a4e81e04d.tar.gz
scala-c5fdc815c30f0565a80a3837f368717a4e81e04d.tar.bz2
scala-c5fdc815c30f0565a80a3837f368717a4e81e04d.zip
Merge pull request #2961 from paulp/pr/whitespace
Cull extraneous whitespace.
Diffstat (limited to 'test/files/run/t5986.scala')
-rw-r--r--test/files/run/t5986.scala10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/run/t5986.scala b/test/files/run/t5986.scala
index 8cf7086f98..b9c21a7b37 100644
--- a/test/files/run/t5986.scala
+++ b/test/files/run/t5986.scala
@@ -9,22 +9,22 @@ import scala.collection._
* and the element already exists in the set.
*/
object Test {
-
+
class Foo(val name: String, val n: Int) {
override def equals(obj: Any): Boolean = obj match { case other: Foo => name == other.name; case _ => false }
override def hashCode = name.##
override def toString = "Foo(" + name + ", " + n + ")"
}
-
+
implicit val ordering: Ordering[Foo] = Ordering.fromLessThan[Foo] { (a, b) => a.name.compareTo(b.name) < 0 }
-
+
def check[S <: Set[Foo]](set: S) {
def output(s: Set[Foo]) = println(s.toList.sorted.mkString(","))
output(set + new Foo("bar", 2))
output(set ++ List(new Foo("bar", 2), new Foo("bar", 3), new Foo("bar", 4)))
output(set union Set(new Foo("bar", 2), new Foo("baz", 3), new Foo("bazz", 4)))
}
-
+
def main(args: Array[String]) {
check(Set(new Foo("bar", 1)))
check(immutable.Set(new Foo("bar", 1)))
@@ -32,5 +32,5 @@ object Test {
check(immutable.SortedSet(new Foo("bar", 1)))
check(mutable.SortedSet(new Foo("bar", 1)))
}
-
+
}