main_marking5/bf_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 26 Apr 2024 17:37:56 +0100
changeset 488 5deaf53c2faa
parent 424 daf561a83ba6
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
424
Christian Urban <christian.urban@kcl.ac.uk>
parents: 392
diff changeset
     1
import M5a._
392
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))