main_marking5/bf_test4b.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 31 Jan 2021 03:24:32 +0000
changeset 392 97ecdc8cb61b
child 424 daf561a83ba6
permissions -rw-r--r--
marking 5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
392
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     1
import CW10a._
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     2
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     3
val urban_bench = 
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
""">+[<+++++++++++++>-]<[[>+>+<<-]>[<+>-]++++++++
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
   [>++++++++<-]>.[-]<<>++++++++++[>++++++++++[>++
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
   ++++++++[>++++++++++[>++++++++++[>++++++++++[>+
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     7
   +++++++++[-]<-]<-]<-]<-]<-]<-]<-]++++++++++."""
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     8
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     9
assert(run(urban_bench, Map()) == 
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
    10
  Map(0 -> 10, 5 -> 0, 1 -> 0, 6 -> 0, 2 -> 0, 7 -> 0, 3 -> 0, 4 -> 0))