--- a/main_testing2/danube_test.sh Mon Dec 07 01:25:41 2020 +0000
+++ b/main_testing2/danube_test.sh Fri Jan 15 02:40:57 2021 +0000
@@ -21,7 +21,7 @@
# functional tests
function scala_assert {
- (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" -e "" 2> /dev/null 1> /dev/null)
+ (ulimit -t 30; JAVA_OPTS="-Xmx1g" scala -i "$1" -- "$2" -e "") # 2> /dev/null 1> /dev/null)
}
# purity test
@@ -177,11 +177,13 @@
if [ $tsts -eq 0 ]
then
- echo -e " val ratings_map2 = for ((k, v) <- ratings_map) yield (k, v.take(2)) " >> $out
- echo -e " most_recommended(ratings_map2, movies_map).take(3) == " >> $out
- echo -e " List((\"M*A*S*H (a.k.a. MASH) (1970)\",15), " >> $out
- echo -e " (\"Star Trek: First Contact (1996)\",10), " >> $out
- echo -e " (\"Inception (2010)\",9))) " >> $out
+ echo -e " val rmap = Map(\"1\" -> List(\"b\", \"a\"), " >> $out
+ echo -e " \"2\" -> List(\"y\", \"x\"), " >> $out
+ echo -e " \"3\" -> List(\"c\", \"a\")) " >> $out
+ echo -e " val nmap = Map(\"a\" -> \"A\", \"b\" -> \"B\", \"c\" -> \"C\", " >> $out
+ echo -e " \"x\" -> \"X\", \"y\" -> \"Y\") " >> $out
+ echo -e " most_recommended(rmap, nmap).toSet == " >> $out
+ echo -e " Set((\"A\",2), (\"B\",1), (\"C\",1), (\"X\",1), (\"Y\",1)) " >> $out
if (scala_assert "danube.scala" "danube_test7.scala")
then