summaryrefslogtreecommitdiff
path: root/test/files/jvm/scala-concurrent-tck.scala
diff options
context:
space:
mode:
authorHeather Miller <heather.miller@epfl.ch>2012-07-05 16:49:40 +0200
committerHeather Miller <heather.miller@epfl.ch>2012-07-05 16:49:40 +0200
commitd2fd2922e71dddb2c22c1a5b0cf36614cd78e1b4 (patch)
treecd32e94c9dba1e1990ac8d738a7e2b958e7c0142 /test/files/jvm/scala-concurrent-tck.scala
parent171a1d8bc859947d80d4728c251abe330dbe9802 (diff)
downloadscala-d2fd2922e71dddb2c22c1a5b0cf36614cd78e1b4.tar.gz
scala-d2fd2922e71dddb2c22c1a5b0cf36614cd78e1b4.tar.bz2
scala-d2fd2922e71dddb2c22c1a5b0cf36614cd78e1b4.zip
SI-5981, SI-5979, SI-5973 Closed. Maintenance to Try.
Diffstat (limited to 'test/files/jvm/scala-concurrent-tck.scala')
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala156
1 files changed, 78 insertions, 78 deletions
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index 012460147a..407027f904 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -138,7 +138,7 @@ trait FutureCallbacks extends TestBase {
testOnSuccessWhenFailed()
testOnFailure()
testOnFailureWhenSpecialThrowable(5, new Error)
- testOnFailureWhenSpecialThrowable(6, new scala.util.control.ControlThrowable { })
+ // testOnFailureWhenSpecialThrowable(6, new scala.util.control.ControlThrowable { })
//TODO: this test is currently problematic, because NonFatal does not match InterruptedException
//testOnFailureWhenSpecialThrowable(7, new InterruptedException)
testOnFailureWhenTimeoutException()
@@ -599,10 +599,10 @@ trait FutureProjections extends TestBase {
throw cause
}
f.failed onComplete {
- case Success(t) =>
+ case Right(t) =>
assert(t == cause)
done()
- case Failure(t) =>
+ case Left(t) =>
assert(false)
}
}
@@ -624,9 +624,9 @@ trait FutureProjections extends TestBase {
done =>
val f = future { 0 }
f.failed onComplete {
- case Success(t) =>
+ case Right(t) =>
assert(false)
- case Failure(t) =>
+ case Left(t) =>
assert(t.isInstanceOf[NoSuchElementException])
done()
}
@@ -733,80 +733,80 @@ trait Exceptions extends TestBase {
}
-trait TryEitherExtractor extends TestBase {
-
- import scala.util.{Try, Success, Failure}
-
- def testSuccessMatch(): Unit = once {
- done =>
- val thisIsASuccess = Success(42)
- thisIsASuccess match {
- case Success(v) =>
- done()
- assert(v == 42)
- case Failure(e) =>
- done()
- assert(false)
- case other =>
- done()
- assert(false)
- }
- }
-
- def testRightMatch(): Unit = once {
- done =>
- val thisIsNotASuccess: Right[Throwable, Int] = Right(43)
- thisIsNotASuccess match {
- case Success(v) =>
- done()
- assert(v == 43)
- case Failure(e) =>
- done()
- assert(false)
- case other =>
- done()
- assert(false)
- }
- }
-
- def testFailureMatch(): Unit = once {
- done =>
- val thisIsAFailure = Failure(new Exception("I'm an exception"))
- thisIsAFailure match {
- case Success(v) =>
- done()
- assert(false)
- case Failure(e) =>
- done()
- assert(e.getMessage == "I'm an exception")
- case other =>
- done()
- assert(false)
- }
- }
-
- def testLeftMatch(): Unit = once {
- done =>
- val thisIsNotAFailure: Left[Throwable, Int] = Left(new Exception("I'm an exception"))
- thisIsNotAFailure match {
- case Success(v) =>
- done()
- assert(false)
- case Failure(e) =>
- done()
- assert(e.getMessage == "I'm an exception")
- case other =>
- done()
- assert(false)
- }
+// trait TryEitherExtractor extends TestBase {
+
+// import scala.util.{Try, Success, Failure}
+
+// def testSuccessMatch(): Unit = once {
+// done =>
+// val thisIsASuccess = Success(42)
+// thisIsASuccess match {
+// case Success(v) =>
+// done()
+// assert(v == 42)
+// case Failure(e) =>
+// done()
+// assert(false)
+// case other =>
+// done()
+// assert(false)
+// }
+// }
+
+// def testRightMatch(): Unit = once {
+// done =>
+// val thisIsNotASuccess: Right[Throwable, Int] = Right(43)
+// thisIsNotASuccess match {
+// case Success(v) =>
+// done()
+// assert(v == 43)
+// case Failure(e) =>
+// done()
+// assert(false)
+// case other =>
+// done()
+// assert(false)
+// }
+// }
+
+// def testFailureMatch(): Unit = once {
+// done =>
+// val thisIsAFailure = Failure(new Exception("I'm an exception"))
+// thisIsAFailure match {
+// case Success(v) =>
+// done()
+// assert(false)
+// case Failure(e) =>
+// done()
+// assert(e.getMessage == "I'm an exception")
+// case other =>
+// done()
+// assert(false)
+// }
+// }
+
+// def testLeftMatch(): Unit = once {
+// done =>
+// val thisIsNotAFailure: Left[Throwable, Int] = Left(new Exception("I'm an exception"))
+// thisIsNotAFailure match {
+// case Success(v) =>
+// done()
+// assert(false)
+// case Failure(e) =>
+// done()
+// assert(e.getMessage == "I'm an exception")
+// case other =>
+// done()
+// assert(false)
+// }
- }
+// }
- testSuccessMatch()
- testRightMatch()
- testFailureMatch()
- testLeftMatch()
-}
+// testSuccessMatch()
+// testRightMatch()
+// testFailureMatch()
+// testLeftMatch()
+// }
trait CustomExecutionContext extends TestBase {
import scala.concurrent.{ ExecutionContext, Awaitable }
@@ -935,7 +935,7 @@ with FutureCombinators
with FutureProjections
with Promises
with Exceptions
-with TryEitherExtractor
+// with TryEitherExtractor
with CustomExecutionContext
{
System.exit(0)