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/replyablereactor2.scala | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'test/files/jvm/replyablereactor2.scala') diff --git a/test/files/jvm/replyablereactor2.scala b/test/files/jvm/replyablereactor2.scala index 57b7cfe201..da9e0e269e 100644 --- a/test/files/jvm/replyablereactor2.scala +++ b/test/files/jvm/replyablereactor2.scala @@ -3,6 +3,7 @@ import scala.actors.Actor._ class MyActor extends ReplyReactor { def act() { + try { loop { react { case 'hello => @@ -11,6 +12,10 @@ class MyActor extends ReplyReactor { exit() } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } @@ -21,6 +26,7 @@ object Test { val b = new Reactor[Any] { def act() { + try { react { case r: MyActor => var i = 0 @@ -36,6 +42,10 @@ object Test { } } } + } catch { + case e: Throwable if !e.isInstanceOf[scala.util.control.ControlThrowable] => + e.printStackTrace() + } } } b.start() -- cgit v1.2.3