summaryrefslogtreecommitdiff
path: root/test/files/jvm/future-spec/FutureTests.scala
diff options
context:
space:
mode:
authorViktor Klang <viktor.klang@gmail.com>2012-07-19 15:27:28 +0200
committerphaller <hallerp@gmail.com>2012-07-19 16:56:39 +0200
commitfaf0f3de05e79af3fd7b5cf3bc3f97331e25042e (patch)
tree6b380cb7721af12c8290d56e248752649e766b7b /test/files/jvm/future-spec/FutureTests.scala
parente75e862006b78d1a159c4ffb6194340492bd2de5 (diff)
downloadscala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.tar.gz
scala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.tar.bz2
scala-faf0f3de05e79af3fd7b5cf3bc3f97331e25042e.zip
Critical bugfixes/leak fixes/API corrections + ScalaDoc for SIP-14
Diffstat (limited to 'test/files/jvm/future-spec/FutureTests.scala')
-rw-r--r--test/files/jvm/future-spec/FutureTests.scala6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/files/jvm/future-spec/FutureTests.scala b/test/files/jvm/future-spec/FutureTests.scala
index ca9ff5090f..30e1a722bf 100644
--- a/test/files/jvm/future-spec/FutureTests.scala
+++ b/test/files/jvm/future-spec/FutureTests.scala
@@ -507,6 +507,12 @@ object FutureTests extends MinimalScalaTest {
}
Await.ready(complex, defaultTimeout).isCompleted mustBe (true)
}
+
+ "should not throw when Await.ready" in {
+ val expected = try Right(5 / 0) catch { case a: ArithmeticException => Left(a) }
+ val f = future(5).map(_ / 0)
+ Await.ready(f, defaultTimeout).value.get.toString mustBe expected.toString
+ }
}