summaryrefslogtreecommitdiff
path: root/test/files/jvm
diff options
context:
space:
mode:
authorRoland <rk@rkuhn.info>2012-09-11 17:58:35 +0200
committerRoland <rk@rkuhn.info>2012-09-11 17:58:35 +0200
commitad6c261eafbe72e014d005d0452c8a628a07f123 (patch)
tree9d96d5c18f44ea1bb6305d8b689019864f90a3b4 /test/files/jvm
parent3767a6a83efc74d34e9025f798eeb2a043e6df8d (diff)
downloadscala-ad6c261eafbe72e014d005d0452c8a628a07f123.tar.gz
scala-ad6c261eafbe72e014d005d0452c8a628a07f123.tar.bz2
scala-ad6c261eafbe72e014d005d0452c8a628a07f123.zip
improve docs and Promise impl
- scaladoc the exceptions thrown by Await.* and Awaitable.* - move intercept[Exception] into partest’s TestUtil object - improve Promise.tryAwait implementation following Viktor’s comments and make use of Deadline to avoid calling System.nanoTime too often
Diffstat (limited to 'test/files/jvm')
-rw-r--r--test/files/jvm/scala-concurrent-tck.scala9
1 files changed, 1 insertions, 8 deletions
diff --git a/test/files/jvm/scala-concurrent-tck.scala b/test/files/jvm/scala-concurrent-tck.scala
index a60f3c8a63..0e76b711de 100644
--- a/test/files/jvm/scala-concurrent-tck.scala
+++ b/test/files/jvm/scala-concurrent-tck.scala
@@ -12,6 +12,7 @@ import scala.concurrent.{ future, promise, blocking }
import scala.util.{ Try, Success, Failure }
import scala.concurrent.util.Duration
import scala.reflect.{ classTag, ClassTag }
+import scala.tools.partest.TestUtil.intercept
trait TestBase {
@@ -21,14 +22,6 @@ trait TestBase {
sv.take(2000)
}
- def intercept[T <: Exception : ClassTag](code: => Unit): Unit =
- try {
- code
- assert(false, "did not throw " + classTag[T])
- } catch {
- case ex: Exception if classTag[T].runtimeClass isInstance ex =>
- }
-
// def assert(cond: => Boolean) {
// try {
// Predef.assert(cond)