summaryrefslogtreecommitdiff
path: root/test/files/jvm/scala-concurrent-tck.scala
diff options
context:
space:
mode:
authorphaller <hallerp@gmail.com>2012-04-14 20:37:14 +0200
committerphaller <hallerp@gmail.com>2012-04-14 20:37:14 +0200
commit23aa1a8d7b08b767f90657baf9bc13a355682671 (patch)
tree7243f629540c7c34b89d5de5fc12d788133f00f7 /test/files/jvm/scala-concurrent-tck.scala
parent1246f69185d958f12ebbff047fc3a72766cfd384 (diff)
downloadscala-23aa1a8d7b08b767f90657baf9bc13a355682671.tar.gz
scala-23aa1a8d7b08b767f90657baf9bc13a355682671.tar.bz2
scala-23aa1a8d7b08b767f90657baf9bc13a355682671.zip
Fix issues with exception handling in futures. Review by @heathermiller
Diffstat (limited to 'test/files/jvm/scala-concurrent-tck.scala')
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala11
1 files changed, 7 insertions, 4 deletions
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index f0ca438774..8fcaceb3f0 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -64,7 +64,7 @@ trait FutureCallbacks extends TestBase {
}
}
}
-
+
def testOnSuccessWhenFailed(): Unit = once {
done =>
val f = future[Unit] {
@@ -94,7 +94,7 @@ trait FutureCallbacks extends TestBase {
assert(x == 1)
}
}
-
+
def testOnFailureWhenSpecialThrowable(num: Int, cause: Throwable): Unit = once {
done =>
val f = future[Unit] {
@@ -289,6 +289,9 @@ trait FutureCombinators extends TestBase {
}
}
+ /* TODO: Test for NonFatal in collect (more of a regression test at this point).
+ */
+
def testForeachSuccess(): Unit = once {
done =>
val p = promise[Int]()
@@ -473,8 +476,8 @@ trait FutureCombinators extends TestBase {
def testFallbackToFailure(): Unit = once {
done =>
val cause = new Exception
- val f = future { throw cause }
- val g = future { sys.error("failed") }
+ val f = future { /*throw cause*/ sys.error("failed") }
+ val g = future { /*sys.error("failed")*/ throw cause }
val h = f fallbackTo g
h onSuccess {