diff options
author | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-08-29 04:14:20 -0700 |
---|---|---|
committer | Grzegorz Kossakowski <grzegorz.kossakowski@gmail.com> | 2012-08-29 04:14:20 -0700 |
commit | a7fbaa126b68078dfe6eb5658211a77b1bfa2339 (patch) | |
tree | 312cbc20646325e1cc247ffd93b74eb90536a360 /test | |
parent | 0ba1db06f5fa9f16a4cb4d9d7a62cf1eb83bd359 (diff) | |
parent | da9fe44775eada64cfefb5add73201e9b9eec589 (diff) | |
download | scala-a7fbaa126b68078dfe6eb5658211a77b1bfa2339.tar.gz scala-a7fbaa126b68078dfe6eb5658211a77b1bfa2339.tar.bz2 scala-a7fbaa126b68078dfe6eb5658211a77b1bfa2339.zip |
Merge pull request #1195 from Blaisorblade/topic/test-try
Add missing tests for SI-6190
Diffstat (limited to 'test')
-rw-r--r-- | test/files/jvm/future-spec/TryTests.scala | 14 |
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 +} |