author | Christian Urban <christian dot urban at kcl dot ac dot uk> |
Mon, 19 Dec 2016 02:55:13 +0000 | |
changeset 90 | d77af4aca939 |
permissions | -rw-r--r-- |
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) |