marking/re2c_test.scala
author Christian Urban <urbanc@in.tum.de>
Tue, 29 Oct 2019 09:54:52 +0000
changeset 278 0c2481cd8b1c
parent 95 4fa7231fede7
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
94
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
import scala.concurrent._
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
import scala.concurrent.duration._
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
import ExecutionContext.Implicits.global
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
import scala.language.postfixOps 
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
lazy val f = Future {
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
  assert(fixpT((x:Int) => if (200000 < x) x else x + 1, 0) == 200001)
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
  assert(fixpT((x:Long) => if (20 < x) x else x + 1, 0L) == 21L)
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
}
ae4708c851ee updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
95
4fa7231fede7 added link file
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents: 94
diff changeset
    13
Await.result(f, 90 second)