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/t2417.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/t2417.scala')
-rw-r--r-- | tests/pending/run/t2417.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/pending/run/t2417.scala b/tests/pending/run/t2417.scala index 8d1527e2d..80105f72b 100644 --- a/tests/pending/run/t2417.scala +++ b/tests/pending/run/t2417.scala @@ -1,10 +1,10 @@ // #2417 object Test { - def parallel(numThreads: Int)(block: => Unit) { + def parallel(numThreads: Int)(block: => Unit): Unit = { var failure: Throwable = null val threads = Array.tabulate(numThreads)(i => new Thread { - override def run { + override def run: Unit = { try { block } catch { @@ -17,7 +17,7 @@ object Test { if (failure != null) println("FAILURE: " + failure) } - def testSet(initialSize: Int, numThreads: Int, passes: Int) { + def testSet(initialSize: Int, numThreads: Int, passes: Int): Unit = { val orig = Set.empty ++ (1 to initialSize) parallel(numThreads) { for (pass <- 0 until passes) { @@ -33,7 +33,7 @@ object Test { } } - def testMap(initialSize: Int, numThreads: Int, passes: Int) { + def testMap(initialSize: Int, numThreads: Int, passes: Int): Unit = { val orig = Map.empty ++ ((1 to initialSize) map ((_,"v"))) parallel(numThreads) { for (pass <- 0 until passes) { @@ -49,7 +49,7 @@ object Test { } } - def main(args: Array[String]) { + def main(args: Array[String]): Unit = { println("testing small Map that doesn't promote to HashMap...") testMap(4, 2, 1000000) println() |