diff options
author | Roland <rk@rkuhn.info> | 2012-09-11 20:37:43 +0200 |
---|---|---|
committer | Roland <rk@rkuhn.info> | 2012-09-11 20:39:24 +0200 |
commit | 4a476e775fe7d3a126a42a5127c31e09b9117393 (patch) | |
tree | aac9c496fa87b5e4b9b5c47b944895a9db0e6399 /test/files/jvm | |
parent | ccf734acb7a6d0ea21cd44e5f0fc378a6804825d (diff) | |
download | scala-4a476e775fe7d3a126a42a5127c31e09b9117393.tar.gz scala-4a476e775fe7d3a126a42a5127c31e09b9117393.tar.bz2 scala-4a476e775fe7d3a126a42a5127c31e09b9117393.zip |
two more minor cleanups to Duration
- copy partest TestUtil.intercept change from PR 1279 branch
- add comment on non-obvious match cases
Diffstat (limited to 'test/files/jvm')
-rw-r--r-- | test/files/jvm/duration-tck.scala | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/test/files/jvm/duration-tck.scala b/test/files/jvm/duration-tck.scala index 87ffa196ca..0947e84004 100644 --- a/test/files/jvm/duration-tck.scala +++ b/test/files/jvm/duration-tck.scala @@ -6,6 +6,7 @@ import scala.concurrent.util._ import duration._ import scala.reflect._ import java.util.concurrent.TimeUnit._ +import scala.tools.partest.TestUtil.intercept object Test extends App { @@ -19,12 +20,6 @@ object Test extends App { } } - def intercept[T <: Exception : ClassTag](code: => Unit) = - try { code; assert(false, "did not throw expected exception " + classTag[T]) } - catch { - case ex: Exception => if (classTag[T].runtimeClass isAssignableFrom ex.getClass) () else throw ex - } - val zero = 0 seconds val one = 1 second val two = one + one |