main_marking5/bf_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sun, 09 Jan 2022 01:06:30 +0000
changeset 420 4edc1a308652
parent 392 97ecdc8cb61b
child 424 daf561a83ba6
permissions -rw-r--r--
updated
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
assert(sread(Map(), 2) == 0)
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     4
assert(sread(Map(2 -> 1), 2) == 1)
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     5
assert(write(Map(), 1, 2) == Map(1 -> 2))
97ecdc8cb61b marking 5
Christian Urban <christian.urban@kcl.ac.uk>
parents:
diff changeset
     6
assert(write(Map(1 -> 0), 1, 2) == Map(1 -> 2))