core_testing2/docdiff_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Mon, 10 Jan 2022 13:51:59 +0000
changeset 421 e97c577bdc24
parent 401 9471c3b7ea02
child 473 ac79c2e534bd
permissions -rw-r--r--
added feedback
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
401
9471c3b7ea02 updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 346
diff changeset
     2
import C2._
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(occurrences(List("a", "b", "b", "c", "d")) == Map("a" -> 1, "b" -> 2, "c" -> 1, "d" -> 1))
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
assert(occurrences(List("d", "b", "d", "b", "d")) == Map("d" -> 3, "b" -> 2))