diff options
author | Ichoran <ichoran@gmail.com> | 2014-01-15 16:15:34 -0800 |
---|---|---|
committer | Ichoran <ichoran@gmail.com> | 2014-01-15 16:15:34 -0800 |
commit | 681308a3aa737be1dae0f702fddadce88c70f90e (patch) | |
tree | dabca228ae45162e0e36b784c44952cd1c87f9a0 | |
parent | dddf1f5a79b1f00b6b173439f3df9e9d2f82af3b (diff) | |
parent | 9c5e7f389315fc5c2c893702bf78748342f9f61e (diff) | |
download | scala-681308a3aa737be1dae0f702fddadce88c70f90e.tar.gz scala-681308a3aa737be1dae0f702fddadce88c70f90e.tar.bz2 scala-681308a3aa737be1dae0f702fddadce88c70f90e.zip |
Merge pull request #3370 from Ichoran/topic/fix-t6200
Repairs unexpected failure of test t6200.scala.
No review; putting fix in as fast as possible.
-rw-r--r-- | test/files/run/t6200.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/files/run/t6200.scala b/test/files/run/t6200.scala index 02659c26bc..9a5d91e042 100644 --- a/test/files/run/t6200.scala +++ b/test/files/run/t6200.scala @@ -10,7 +10,7 @@ object Test extends App { def testCorrectness[T: Ordering](n: Int, mkKey: Int => T) { val o = implicitly[Ordering[T]] - val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) ->()) + val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) -> (())) for (i <- 0 until n) { val ki = mkKey(i) val a = s.filter(kv => o.lt(kv._1, ki)) @@ -24,7 +24,7 @@ object Test extends App { // I could not come up with a simple test that tests structural sharing when only parts are reused, but // at least this fails with the old and passes with the new implementation def testSharing() { - val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ ->()) + val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ -> (())) require(s.filter(_ => true) eq s) require(s.filterNot(_ => false) eq s) } @@ -50,7 +50,7 @@ object Test extends App { } } - val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) ->()) + val s = HashMap.empty[HashCounter, Unit] ++ (0 until 100).map(k => HashCounter(k) -> (())) val hashCount0 = hashCount val equalsCount0 = equalsCount val t = s.filter(_._1 < HashCounter(50)) |