pre_marking2/docdiff_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Thu, 13 Jan 2022 12:55:03 +0000
changeset 423 e9d14d58be3c
parent 382 1bd800376e0c
permissions -rw-r--r--
test


import CW7a._

assert(occurrences(List("a", "b", "b", "c", "d")) == Map("a" -> 1, "b" -> 2, "c" -> 1, "d" -> 1))

assert(occurrences(List("d", "b", "d", "b", "d")) == Map("d" -> 3, "b" -> 2))

assert(occurrences(List("b", "b", "b", "b", "b")) == Map("b" -> 5))

assert(occurrences(Nil) == Map())