main_testing5/bf_test.sh
changeset 404 bf20a9fa5c29
parent 384 6e1237691307
child 419 d8dbf91c149b
equal deleted inserted replaced
403:ffce7b61b446 404:bf20a9fa5c29
     3 
     3 
     4 out=${1:-output}
     4 out=${1:-output}
     5 
     5 
     6 echo -e "" > $out
     6 echo -e "" > $out
     7 
     7 
     8 echo -e "Below is the feedback for your submission of CW 10." >> $out
     8 echo -e "Below is the feedback for your submission of bf.scala." >> $out
     9 echo -e "" >> $out
     9 echo -e "" >> $out
    10 
    10 
    11 
    11 
    12 # compilation tests
    12 # compilation tests
    13 
    13 
   117 if [ $tsts1 -eq 0 ]
   117 if [ $tsts1 -eq 0 ]
   118 then
   118 then
   119   echo -e " run(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" >> $out
   119   echo -e " run(\"[-]\", Map(0 -> 100)) == Map(0 -> 0)" >> $out
   120   echo -e " run(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" >> $out
   120   echo -e " run(\"[->+<]\", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)" >> $out
   121   echo -e " run(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" >> $out
   121   echo -e " run(\"[>>+>>+<<<<-]\", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)" >> $out
   122   echo -e " run(\"++++++++++#>+***#\") == Map(0 -> 10, 1 -> 1000)" >> $out
       
   123   echo -e " run(\"+++>+@+@+@+@+@\") == Map(0 -> 3, 1 -> 7, 4 -> 3, 5 -> 3, 6 -> 3, 7 -> 3)" >> $out
       
   124   
   122   
   125   echo -e " run(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" >> $out
   123   echo -e " run(\"\"\"+++++[->++++++++++<]>--<+++[->>++++++++++" >> $out
   126   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" >> $out
   124   echo -e "        <<]>>++<<----------[+>.>.<+<]\"\"\") == Map(0 -> 0, 1 -> 58, 2 -> 32)" >> $out
   127 
   125 
   128   if (scala_assert "bf.scala" "bf_test4.scala")
   126   if (scala_assert "bf.scala" "bf_test4.scala")