424
|
1 |
import M5a._
|
392
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
2 |
|
463
|
3 |
|
|
4 |
import scala.concurrent._
|
|
5 |
import scala.concurrent.duration._
|
|
6 |
import ExecutionContext.Implicits.global
|
|
7 |
import scala.language.postfixOps
|
|
8 |
|
|
9 |
lazy val f = Future {
|
392
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
10 |
val urban_bench =
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
11 |
""">+[<+++++++++++++>-]<[[>+>+<<-]>[<+>-]++++++++
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
12 |
[>++++++++<-]>.[-]<<>++++++++++[>++++++++++[>++
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
13 |
++++++++[>++++++++++[>++++++++++[>++++++++++[>+
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
14 |
+++++++++[-]<-]<-]<-]<-]<-]<-]<-]++++++++++."""
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
15 |
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
16 |
assert(run(urban_bench, Map()) ==
|
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff
changeset
|
17 |
Map(0 -> 10, 5 -> 0, 1 -> 0, 6 -> 0, 2 -> 0, 7 -> 0, 3 -> 0, 4 -> 0))
|
463
|
18 |
|
|
19 |
}
|
|
20 |
|
|
21 |
Await.result(f, 32 second)
|