summaryrefslogtreecommitdiff
path: root/test/files
diff options
context:
space:
mode:
Diffstat (limited to 'test/files')
-rw-r--r--test/files/jvm/concurrent-future.scala15
1 files changed, 7 insertions, 8 deletions
diff --git a/test/files/jvm/concurrent-future.scala b/test/files/jvm/concurrent-future.scala
index 8fb237eb0a..eb3bbad591 100644
--- a/test/files/jvm/concurrent-future.scala
+++ b/test/files/jvm/concurrent-future.scala
@@ -44,7 +44,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
@@ -56,7 +56,7 @@ object Test extends App {
def testOnFailure(): Unit = once {
done =>
- val f = future {
+ val f = future[Unit] {
output(4, "hai world")
throw new Exception
}
@@ -64,16 +64,15 @@ object Test extends App {
output(4, "onoes")
done()
}
- f onFailure {
- case _ =>
- output(4, "kthxbye")
- done()
+ f onFailure { case _ =>
+ output(4, "kthxbye")
+ done()
}
}
def testOnFailureWhenSpecialThrowable(num: Int, cause: Throwable): Unit = once {
done =>
- val f = future {
+ val f = future[Unit] {
output(num, "hai world")
throw cause
}
@@ -93,7 +92,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)
}