summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2013-11-22 10:32:50 -0600
committerPhilipp Haller <hallerp@gmail.com>2013-12-05 09:53:33 +0100
commit70634395a4ea6e05877704e655a5870692581ebc (patch)
tree6231ae8dfb3a0c2c9b4a0f7cfcac22b4858ec747 /test/files/jvm
parent7c1d1149291e1b83c96a0f6954144b9e97c030ea (diff)
downloadscala-70634395a4ea6e05877704e655a5870692581ebc.tar.gz
scala-70634395a4ea6e05877704e655a5870692581ebc.tar.bz2
scala-70634395a4ea6e05877704e655a5870692581ebc.zip
SI-6913 Fixing semantics of Future fallbackTo to be according to docs
Origin: viktorklang@1bbe854
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/future-spec/PromiseTests.scala4
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/files/jvm/future-spec/PromiseTests.scala b/test/files/jvm/future-spec/PromiseTests.scala
index 8e07393900..48f94666ba 100644
--- a/test/files/jvm/future-spec/PromiseTests.scala
+++ b/test/files/jvm/future-spec/PromiseTests.scala
@@ -38,10 +38,10 @@ object PromiseTests extends MinimalScalaTest {
Await.result(failure fallbackTo timedOut, defaultTimeout) mustBe ("Timedout")
Await.result(timedOut fallbackTo empty, defaultTimeout) mustBe ("Timedout")
- Await.result(failure fallbackTo failure fallbackTo timedOut, defaultTimeout) mustBe ("Timedout")
+ Await.result(otherFailure fallbackTo failure fallbackTo timedOut, defaultTimeout) mustBe ("Timedout")
intercept[RuntimeException] {
Await.result(failure fallbackTo otherFailure, defaultTimeout)
- }.getMessage mustBe ("last")
+ }.getMessage mustBe ("br0ken")
}
}
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index 6e2b8ca033..a306a7d15b 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -344,8 +344,8 @@ def testTransformFailure(): Unit = once {
def testFallbackToFailure(): Unit = once {
done =>
val cause = new Exception
- val f = future { sys.error("failed") }
- val g = future { throw cause }
+ val f = future { throw cause }
+ val g = future { sys.error("failed") }
val h = f fallbackTo g
h onSuccess { case _ => done(false) }