testing2/docdiff_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Tue, 13 Oct 2020 10:21:21 +0100
changeset 343 c8fcc0e0a57f
parent 283 ef5f62bf5987
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
211
092e0879a5ae updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
283
ef5f62bf5987 updated
Christian Urban <urbanc@in.tum.de>
parents: 211
diff changeset
     2
import CW7a._
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))