diff options
author | Paul Phillips <paulp@improving.org> | 2009-10-06 20:52:57 +0000 |
---|---|---|
committer | Paul Phillips <paulp@improving.org> | 2009-10-06 20:52:57 +0000 |
commit | 3826ab49382bac0392eff859d2865e8a3675a011 (patch) | |
tree | 8e9f4aaf1d4c3ba1591c3915556f8ff35499a9d4 /test/disabled | |
parent | 8befdb8b05b097c7861dc959f4ec29e5b8a758e6 (diff) | |
download | scala-3826ab49382bac0392eff859d2865e8a3675a011.tar.gz scala-3826ab49382bac0392eff859d2865e8a3675a011.tar.bz2 scala-3826ab49382bac0392eff859d2865e8a3675a011.zip |
Disabled an actor test which is hanging the tes...
Disabled an actor test which is hanging the test suite.
Diffstat (limited to 'test/disabled')
-rw-r--r-- | test/disabled/jvm/reactor-exceptionOnSend.check | 2 | ||||
-rw-r--r-- | test/disabled/jvm/reactor-exceptionOnSend.scala | 44 |
2 files changed, 46 insertions, 0 deletions
diff --git a/test/disabled/jvm/reactor-exceptionOnSend.check b/test/disabled/jvm/reactor-exceptionOnSend.check new file mode 100644 index 0000000000..45d62e26a7 --- /dev/null +++ b/test/disabled/jvm/reactor-exceptionOnSend.check @@ -0,0 +1,2 @@ +receiver handles exception +process diff --git a/test/disabled/jvm/reactor-exceptionOnSend.scala b/test/disabled/jvm/reactor-exceptionOnSend.scala new file mode 100644 index 0000000000..3684943b9b --- /dev/null +++ b/test/disabled/jvm/reactor-exceptionOnSend.scala @@ -0,0 +1,44 @@ +import scala.actors.Reactor +import scala.actors.Actor._ + +case class MyException(text: String) extends Exception(text) + +object A extends Reactor { + override def exceptionHandler = { + case MyException(text) => + println("receiver handles exception") + } + + def guard(): Boolean = + if (state == 0) { + state = 1 + throw MyException("illegal state") + } else + true + + var state = 0 + + def act() { + loop { + react { + case 'hello if guard() => + println("process") + exit() + } + } + } +} + +object B extends Reactor { + def act() { + A.start() + A ! 'hello + A ! 'hello + } +} + +object Test { + def main(args: Array[String]) { + B.start() + } +} |