marking2/docdiff_test.sh
changeset 323 1f8005b4cdf6
parent 283 ef5f62bf5987
equal deleted inserted replaced
322:755d165633ec 323:1f8005b4cdf6
    96   echo -e "  occurrences(List(\"a\", \"b\", \"b\", \"c\", \"d\")) == " |  tee -a $out
    96   echo -e "  occurrences(List(\"a\", \"b\", \"b\", \"c\", \"d\")) == " |  tee -a $out
    97   echo -e "      Map(\"a\" -> 1, \"b\" -> 2, \"c\" -> 1, \"d\" -> 1)" |  tee -a $out
    97   echo -e "      Map(\"a\" -> 1, \"b\" -> 2, \"c\" -> 1, \"d\" -> 1)" |  tee -a $out
    98   echo -e "  " |  tee -a $out
    98   echo -e "  " |  tee -a $out
    99   echo -e "  occurrences(List(\"d\", \"b\", \"d\", \"b\", \"d\")) == " |  tee -a $out
    99   echo -e "  occurrences(List(\"d\", \"b\", \"d\", \"b\", \"d\")) == " |  tee -a $out
   100   echo -e "      Map(\"d\" -> 3, \"b\" -> 2)" |  tee -a $out
   100   echo -e "      Map(\"d\" -> 3, \"b\" -> 2)" |  tee -a $out
       
   101   echo -e "  " |  tee -a $out
       
   102   echo -e "  occurrences(Nil) == Map() " |  tee -a $out
       
   103   echo -e "  " |  tee -a $out
       
   104   echo -e "  occurrences(List(\"b\", \"b\", \"b\", \"b\", \"b\")) == Map(\"b\" -> 5)" |  tee -a $out
   101 
   105 
   102   if (scala_assert "docdiff.scala" "docdiff_test2.scala") 
   106   if (scala_assert "docdiff.scala" "docdiff_test2.scala") 
   103   then
   107   then
   104       echo -e "  --> success" |  tee -a $out
   108       echo -e "  --> success" |  tee -a $out
   105       marks=$(( marks + 1 ))
   109       marks=$(( marks + 1 ))
   116   echo -e "  val l2 = List(\"d\", \"b\", \"d\", \"b\", \"d\")" |  tee -a $out
   120   echo -e "  val l2 = List(\"d\", \"b\", \"d\", \"b\", \"d\")" |  tee -a $out
   117   echo -e "  " |  tee -a $out
   121   echo -e "  " |  tee -a $out
   118   echo -e "  prod(l1, l2) == 7 " |  tee -a $out
   122   echo -e "  prod(l1, l2) == 7 " |  tee -a $out
   119   echo -e "  prod(l1, l1) == 7 " |  tee -a $out
   123   echo -e "  prod(l1, l1) == 7 " |  tee -a $out
   120   echo -e "  prod(l2, l2) == 13 " |  tee -a $out
   124   echo -e "  prod(l2, l2) == 13 " |  tee -a $out
       
   125   echo -e "  " |  tee -a $out
       
   126   echo -e "  val l3 = List(\"1\", \"2\", \"3\", \"4\", \"5\")" |  tee -a $out
       
   127   echo -e "  prod(l1, l3) == 0 " |  tee -a $out
   121 
   128 
   122   if (scala_assert "docdiff.scala" "docdiff_test3.scala") 
   129   if (scala_assert "docdiff.scala" "docdiff_test3.scala") 
   123   then
   130   then
   124       echo -e "  --> success" |  tee -a $out
   131       echo -e "  --> success" |  tee -a $out
   125       marks=$(( marks + 1 ))
   132       marks=$(( marks + 1 ))