From ad6c261eafbe72e014d005d0452c8a628a07f123 Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 11 Sep 2012 17:58:35 +0200 Subject: improve docs and Promise impl MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 --- test/files/jvm/scala-concurrent-tck.scala | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'test/files/jvm') 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) -- cgit v1.2.3