summaryrefslogtreecommitdiff
path: root/test/files/jvm/future-spec
diff options
context:
space:
mode:
authorPaolo Giarrusso <p.giarrusso@gmail.com>2012-08-25 18:44:36 +0200
committerPaolo Giarrusso <p.giarrusso@gmail.com>2012-08-25 18:44:36 +0200
commitda9fe44775eada64cfefb5add73201e9b9eec589 (patch)
tree16dd52192091e3a797188772da40e9c9edc7e1e5 /test/files/jvm/future-spec
parent811be49d3e9a45ef95df6132754e11360b19d917 (diff)
downloadscala-da9fe44775eada64cfefb5add73201e9b9eec589.tar.gz
scala-da9fe44775eada64cfefb5add73201e9b9eec589.tar.bz2
scala-da9fe44775eada64cfefb5add73201e9b9eec589.zip
Add missing tests for SI-6190
This was silently fixed in commit 3cb0e784a05db7d0b542cec9bf4c5fbf3772a6cf but no test was added.
Diffstat (limited to 'test/files/jvm/future-spec')
-rw-r--r--test/files/jvm/future-spec/TryTests.scala14
1 files changed, 13 insertions, 1 deletions
diff --git a/test/files/jvm/future-spec/TryTests.scala b/test/files/jvm/future-spec/TryTests.scala
index 82ca12276f..5d1b9b84b4 100644
--- a/test/files/jvm/future-spec/TryTests.scala
+++ b/test/files/jvm/future-spec/TryTests.scala
@@ -46,6 +46,12 @@ object TryTests extends MinimalScalaTest {
val e2 = new Exception
Failure[Int](e) map(_ => throw e2) mustEqual Failure(e)
}
+ "when there is a fatal exception" in {
+ val e3 = new ThreadDeath
+ intercept[ThreadDeath] {
+ Success(1) map (_ => throw e3)
+ }
+ }
}
"flatMap" in {
@@ -60,6 +66,12 @@ object TryTests extends MinimalScalaTest {
val e2 = new Exception
Failure[Int](e).flatMap[Int](_ => throw e2) mustEqual Failure(e)
}
+ "when there is a fatal exception" in {
+ val e3 = new ThreadDeath
+ intercept[ThreadDeath] {
+ Success(1).flatMap[Int](_ => throw e3)
+ }
+ }
}
"flatten" in {
@@ -115,4 +127,4 @@ object TryTests extends MinimalScalaTest {
}
}
}
-} \ No newline at end of file
+}