From bc791369f79f2d1a72a93674eb7b0f34ca58d8d1 Mon Sep 17 00:00:00 2001 From: Philipp Haller Date: Tue, 13 Apr 2010 14:41:02 +0000 Subject: Hardened actor tests. No review. --- test/files/jvm/t1948.scala | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'test/files/jvm/t1948.scala') diff --git a/test/files/jvm/t1948.scala b/test/files/jvm/t1948.scala index fc1fedac1f..084c956398 100644 --- a/test/files/jvm/t1948.scala +++ b/test/files/jvm/t1948.scala @@ -4,9 +4,21 @@ import scala.actors.Actor._ object Test { def main (args: Array[String]) { - val actors = (1 to 1000).toList map { x => actor { loop { react { - case x: Array[Int] => reply ("OK"); exit }}}} + val actors = (1 to 1000).toList map { x => actor { + try { + loop { react { + case x: Array[Int] => reply ("OK"); exit }} + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } + } } + try { actors foreach { x => x !? new Array[Int] (1000000) } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } -- cgit v1.2.3