diff options
author | Aleksandar Prokopec <axel22@gmail.com> | 2012-02-16 13:47:59 +0100 |
---|---|---|
committer | Aleksandar Prokopec <axel22@gmail.com> | 2012-02-16 17:51:09 +0100 |
commit | ab84c8d9a97b41728e77f7808eda2748d052ca06 (patch) | |
tree | c56341a3ec7b4a7032574500784a8389feac9581 /test/files/jvm/scala-concurrent-tck.scala | |
parent | 53b05bb12f5a7a50448bcac9434389bf95273c45 (diff) | |
download | scala-ab84c8d9a97b41728e77f7808eda2748d052ca06.tar.gz scala-ab84c8d9a97b41728e77f7808eda2748d052ca06.tar.bz2 scala-ab84c8d9a97b41728e77f7808eda2748d052ca06.zip |
Disable execution context and futures implementation in the default package.
Fixed some tests so that they work now.
The Transactions.scala test was failing when defined in scala.concurrent
package, reporting that type `_$1` is defined twice. Until we figure out
the reason for this, the package name in that test is renamed.
Diffstat (limited to 'test/files/jvm/scala-concurrent-tck.scala')
-rw-r--r-- | test/files/jvm/scala-concurrent-tck.scala | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala index a951c09da2..244ff02da7 100644 --- a/test/files/jvm/scala-concurrent-tck.scala +++ b/test/files/jvm/scala-concurrent-tck.scala @@ -11,6 +11,7 @@ import scala.concurrent.{ import scala.concurrent.future import scala.concurrent.promise import scala.concurrent.blocking +import scala.util.{ Try, Success, Failure } import scala.util.Duration @@ -23,13 +24,13 @@ trait TestBase { sv.take() } - def assert(cond: => Boolean) { - try { - Predef.assert(cond) - } catch { - case e => e.printStackTrace() - } - } + // def assert(cond: => Boolean) { + // try { + // Predef.assert(cond) + // } catch { + // case e => e.printStackTrace() + // } + // } } @@ -264,10 +265,10 @@ trait FutureProjections extends TestBase { throw cause } f.failed onComplete { - case Right(t) => + case Success(t) => assert(t == cause) done() - case Left(t) => + case Failure(t) => assert(false) } } @@ -289,9 +290,9 @@ trait FutureProjections extends TestBase { done => val f = future { 0 } f.failed onComplete { - case Right(t) => + case Success(t) => assert(false) - case Left(t) => + case Failure(t) => assert(t.isInstanceOf[NoSuchElementException]) done() } |