marking/re1a_test.scala
author Christian Urban <christian dot urban at kcl dot ac dot uk>
Mon, 05 Aug 2019 20:14:06 +0100
changeset 269 86a85865e772
parent 90 d77af4aca939
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
90
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     1
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     2
import scala.concurrent._
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     3
import scala.concurrent.duration._
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     4
import ExecutionContext.Implicits.global
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     5
import scala.language.postfixOps 
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     6
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     7
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     8
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
     9
lazy val f = Future {
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    10
  assert(nullable(ZERO) == false)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    11
  assert(nullable(ONE) == true)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    12
  assert(nullable(CHAR('a')) == false)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    13
  assert(nullable(ZERO | ONE) == true)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    14
  assert(nullable(ZERO | CHAR('a')) == false)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    15
  assert(nullable(ONE ~  ONE) == true)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    16
  assert(nullable(ONE ~ CHAR('a')) == false)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    17
  assert(nullable(STAR(ZERO)) == true)
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    18
}
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    19
d77af4aca939 updated
Christian Urban <christian dot urban at kcl dot ac dot uk>
parents:
diff changeset
    20
Await.result(f, 120 second)