--- a/main_marking2/danube_test2.scala Thu Jan 13 12:55:03 2022 +0000
+++ b/main_marking2/danube_test2.scala Mon Apr 11 23:55:27 2022 +0100
@@ -2,7 +2,7 @@
import io.Source
import scala.util._
-import CW7b._
+import M2._
def urban_get_csv_file(name: String) : List[String] = {
val csv = Source.fromFile(name)
@@ -12,8 +12,11 @@
val urban_ratings = urban_get_csv_file("ratings.csv")
val urban_movies = urban_get_csv_file("movies.csv")
+val urban_res1 = process_ratings(urban_ratings)
+val urban_rat_elems = List(("1","1"), ("1","3"), ("1","6"), ("1","47"))
-assert(process_ratings(urban_ratings).length == 48580)
+assert(urban_res1.length == 48580)
+assert(urban_rat_elems.forall(urban_res1.contains(_)))
assert(process_movies(urban_movies).length == 9742)