diff options
author | Philipp Haller <hallerp@gmail.com> | 2011-12-09 16:18:38 +0100 |
---|---|---|
committer | Philipp Haller <hallerp@gmail.com> | 2011-12-09 16:18:38 +0100 |
commit | 6f5338c2aa423a5d2aa49f6fbdbe6ae3f3724a48 (patch) | |
tree | d83e635e371710619171872e1fe83e6ce9f39ced /test | |
parent | 64d50018b7a17c952c2bffaa38928bee2a9ee36c (diff) | |
download | scala-6f5338c2aa423a5d2aa49f6fbdbe6ae3f3724a48.tar.gz scala-6f5338c2aa423a5d2aa49f6fbdbe6ae3f3724a48.tar.bz2 scala-6f5338c2aa423a5d2aa49f6fbdbe6ae3f3724a48.zip |
Fix future tests
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/concurrent-future.scala | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/files/jvm/concurrent-future.scala b/test/files/jvm/concurrent-future.scala index 9c2f04fb07..30f604d5c1 100644 --- a/test/files/jvm/concurrent-future.scala +++ b/test/files/jvm/concurrent-future.scala @@ -40,7 +40,7 @@ object Test extends App { def testOnSuccessWhenFailed(): Unit = once { done => - val f = future { + val f = future[Unit] { output(3, "hai world") done() throw new Exception @@ -52,7 +52,7 @@ object Test extends App { def testOnFailure(): Unit = once { done => - val f = future { + val f = future[Unit] { output(4, "hai world") throw new Exception } @@ -60,7 +60,7 @@ object Test extends App { output(4, "onoes") done() } - f onFailure { _ => + f onFailure { case _ => output(4, "kthxbye") done() } @@ -68,7 +68,7 @@ object Test extends App { def testOnFailureWhenSpecialThrowable(num: Int, cause: Throwable): Unit = once { done => - val f = future { + val f = future[Unit] { output(num, "hai world") throw cause } @@ -88,7 +88,7 @@ object Test extends App { def testOnFailureWhenFutureTimeoutException(): Unit = once { done => - val f = future { + val f = future[Unit] { output(8, "hai world") throw new FutureTimeoutException(null) } |