diff options
author | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
---|---|---|
committer | Dmitry Petrashko <dmitry.petrashko@gmail.com> | 2015-05-13 12:08:27 +0200 |
commit | 73a93505c432b410ae39fb3c4d6168b2e49832ce (patch) | |
tree | 53d45141a7b93682bea6430b0fb6ab28c3c3fad3 /tests/pending/run/t6200.scala | |
parent | 89bacb9c25a58454ff1878e67f7ea07ffc8c269f (diff) | |
download | dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.gz dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.tar.bz2 dotty-73a93505c432b410ae39fb3c4d6168b2e49832ce.zip |
Running rewrite tool on run tests.
Diffstat (limited to 'tests/pending/run/t6200.scala')
-rw-r--r-- | tests/pending/run/t6200.scala | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pending/run/t6200.scala b/tests/pending/run/t6200.scala index 75600cd55..fd96b3ab5 100644 --- a/tests/pending/run/t6200.scala +++ b/tests/pending/run/t6200.scala @@ -8,7 +8,7 @@ object Test extends App { override def hashCode = value / 5 } - def testCorrectness[T: Ordering](n: Int, mkKey: Int => T) { + def testCorrectness[T: Ordering](n: Int, mkKey: Int => T): Unit = { val o = implicitly[Ordering[T]] val s = HashMap.empty[T, Unit] ++ (0 until n).map(x => mkKey(x) -> (())) for (i <- 0 until n) { @@ -23,14 +23,14 @@ object Test extends App { // this tests the structural sharing of the new filter // 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() { + def testSharing(): Unit = { val s = HashMap.empty[Int, Unit] ++ (0 until 100).map(_ -> (())) require(s.filter(_ => true) eq s) require(s.filterNot(_ => false) eq s) } // this tests that neither hashCode nor equals are called during filter - def testNoHashing() { + def testNoHashing(): Unit = { var hashCount = 0 var equalsCount = 0 case class HashCounter(value: Int) extends Ordered[HashCounter] { |