diff options
Diffstat (limited to 'test/disabled/jvm')
-rw-r--r-- | test/disabled/jvm/JavaInteraction.check | 4 | ||||
-rw-r--r-- | test/disabled/jvm/JavaInteraction.scala | 38 | ||||
-rw-r--r-- | test/disabled/jvm/concurrent-future.check | 14 | ||||
-rw-r--r-- | test/disabled/jvm/concurrent-future.scala | 122 |
4 files changed, 0 insertions, 178 deletions
diff --git a/test/disabled/jvm/JavaInteraction.check b/test/disabled/jvm/JavaInteraction.check deleted file mode 100644 index fb9d3cdd8c..0000000000 --- a/test/disabled/jvm/JavaInteraction.check +++ /dev/null @@ -1,4 +0,0 @@ -p.x = 5 -p.c = java.awt.Color[r=255,g=0,b=0] -p.getX() = 5.0 -p.getC() = java.awt.Color[r=255,g=0,b=0] diff --git a/test/disabled/jvm/JavaInteraction.scala b/test/disabled/jvm/JavaInteraction.scala deleted file mode 100644 index 65e3c5cb40..0000000000 --- a/test/disabled/jvm/JavaInteraction.scala +++ /dev/null @@ -1,38 +0,0 @@ -//############################################################################ -// Test Java interaction -//############################################################################ - -import java.awt.Color; -import java.awt.Point; - -class ColoredPoint(x: Int, y: Int, c_ : Color) extends Point(x, y) { - val c: Color = c_; - def getC(): Color = c; -} - -object Test { - val expected = """ -p.x = 5 -p.c = java.awt.Color[r=255,g=0,b=0] -p.getX() = 5.0 -p.getC() = java.awt.Color[r=255,g=0,b=0] - """.trim - - def connect() = { - val p = new ColoredPoint(5, 7, Color.RED); - List( - "p.x = " + p.x, - "p.c = " + p.c, - "p.getX() = " + p.getX(), - "p.getC() = " + p.getC() - ).mkString("\n") - } - - // This test would pointlessly fail the whole build anytime the account - // running the test could not connect to the windowing server. The below - // is intended to defend against this outcome. - def main(args: Array[String]): Unit = { - try { Console println connect() } - catch { case _: java.lang.InternalError => Console println expected } - } -} diff --git a/test/disabled/jvm/concurrent-future.check b/test/disabled/jvm/concurrent-future.check deleted file mode 100644 index 715ac90ce7..0000000000 --- a/test/disabled/jvm/concurrent-future.check +++ /dev/null @@ -1,14 +0,0 @@ -test1: hai world -test1: kthxbye -test2: hai world -test2: awsum thx -test2: kthxbye -test3: hai world -test4: hai world -test4: kthxbye -test5: hai world -test5: kthxbye -test6: hai world -test6: kthxbye -test7: hai world -test7: kthxbye diff --git a/test/disabled/jvm/concurrent-future.scala b/test/disabled/jvm/concurrent-future.scala deleted file mode 100644 index eda05428c8..0000000000 --- a/test/disabled/jvm/concurrent-future.scala +++ /dev/null @@ -1,122 +0,0 @@ - - - -import scala.concurrent._ - - - -object Test extends App { - - def once(body: (() => Unit) => Unit) { - val sv = new SyncVar[Boolean] - body(() => sv put true) - sv.take() - } - - def output(num: Int, msg: String) { - println("test" + num + ": " + msg) - } - - def testOnSuccess(): Unit = once { - done => - val f = future { - output(1, "hai world") - } - f onSuccess { case _ => - output(1, "kthxbye") - done() - } - } - - def testOnSuccessWhenCompleted(): Unit = once { - done => - val f = future { - output(2, "hai world") - } - f onSuccess { case _ => - output(2, "awsum thx") - f onSuccess { case _ => - output(2, "kthxbye") - done() - } - } - } - - def testOnSuccessWhenFailed(): Unit = once { - done => - val f = future[Unit] { - output(3, "hai world") - done() - throw new Exception - } - f onSuccess { case _ => - output(3, "onoes") - } - } - - def testOnFailure(): Unit = once { - done => - val f = future[Unit] { - output(4, "hai world") - throw new Exception - } - f onSuccess { case _ => - output(4, "onoes") - done() - } - f onFailure { case _ => - output(4, "kthxbye") - done() - } - } - - def testOnFailureWhenSpecialThrowable(num: Int, cause: Throwable): Unit = once { - done => - val f = future[Unit] { - output(num, "hai world") - throw cause - } - f onSuccess { case _ => - output(num, "onoes") - done() - } - f onFailure { - case e: ExecutionException if (e.getCause == cause) => - output(num, "kthxbye") - done() - case _ => - output(num, "onoes") - done() - } - } - - // def testOnFailureWhenFutureTimeoutException(): Unit = once { - // done => - // val f = future[Unit] { - // output(8, "hai world") - // throw new FutureTimeoutException(null) - // } - // f onSuccess { case _ => - // output(8, "onoes") - // done() - // } - // f onFailure { - // case e: FutureTimeoutException => - // output(8, "im in yr loop") - // done() - // case other => - // output(8, "onoes: " + other) - // done() - // } - // } - - testOnSuccess() - testOnSuccessWhenCompleted() - testOnSuccessWhenFailed() - testOnFailure() - testOnFailureWhenSpecialThrowable(5, new Error) - testOnFailureWhenSpecialThrowable(6, new scala.util.control.ControlThrowable { }) - testOnFailureWhenSpecialThrowable(7, new InterruptedException) - // testOnFailureWhenFutureTimeoutException() - -} |