main_testing2/danube_test7.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 05 Nov 2021 17:20:01 +0000
changeset 397 085fefce672e
parent 384 6e1237691307
permissions -rw-r--r--
updated


import CW7b._

val urban_recs = 
  Map("1" -> List("b", "a"), 
      "2" -> List("y", "x"), 
      "3" -> List("a", "c"))

val urban_names = Map("a" -> "A", "b" -> "B", "c" -> "C", "x" -> "X", "y" -> "Y")

assert(most_recommended(urban_recs, urban_names).toSet ==
        Set(("A",2), ("B",1), ("C",1), ("X",1), ("Y",1)))