marking/mark02b
changeset 96 abfcb6111d33
parent 86 f8a781322499
child 98 8f03f0dc3065
equal deleted inserted replaced
86:f8a781322499 96:abfcb6111d33
    10 echo "ratified by the assessment board -- this is not an official" >> $out
    10 echo "ratified by the assessment board -- this is not an official" >> $out
    11 echo "results transcript." >> $out
    11 echo "results transcript." >> $out
    12 echo "" >> $out
    12 echo "" >> $out
    13 
    13 
    14 function scala_vars {
    14 function scala_vars {
    15    (egrep 'var|return|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
    15    (egrep '\bvar\b|\breturn\b|ListBuffer|mutable' "$1" 2> /dev/null 1> /dev/null)
    16 }
    16 }
    17 
    17 
    18 
    18 
    19 # compilation tests
    19 # compilation tests
    20 
    20 
    64 else
    64 else
    65   tsts1=$(( 1 ))     
    65   tsts1=$(( 1 ))     
    66 fi
    66 fi
    67 
    67 
    68 
    68 
       
    69 if [ $tsts1 -eq 0 ]
       
    70 then
       
    71   echo " ordered_moves(8, List((3,4), (3,2)), (1,3)) == (0,1), (0,5), (2,1), (2,5)" | tee -a $out
       
    72   echo " ordered_moves(8, List((4,0)), (0,0)) == (2,1), (1,2)" | tee -a $out
       
    73   echo " ordered_moves(8, List((0,4)), (0,0)) == (1,2), (2,1)" | tee -a $out
       
    74   
       
    75   if (scala_assert "knight3.scala.bak" "../../../marking/knight3a_test.scala")
       
    76   then
       
    77     echo "  --> success" | tee -a $out
       
    78     marks=$(( marks + 1 ))
       
    79   else
       
    80     echo "  --> test failed" | tee -a $out
       
    81   fi
       
    82 fi
    69 
    83 
       
    84 if [ $tsts1 -eq 0 ]
       
    85 then
       
    86   echo " first_closed_tour_heuristic(6, List((3, 3))) is ok?" | tee -a $out
       
    87   
       
    88   if (scala_assert "knight3.scala.bak" "../../../marking/knight3b_test.scala")
       
    89   then
       
    90     echo "  --> success" | tee -a $out
       
    91     marks=$(( marks + 1 ))
       
    92   else
       
    93     echo "  --> test failed" | tee -a $out
       
    94   fi
       
    95 fi
    70 
    96 
    71 
    97 
    72 ## final marks
    98 ## final marks
    73 echo "Overall mark for CW 7, Part 2" | tee -a $out
    99 echo "Overall mark for CW 7, Part 2" | tee -a $out
    74 echo "$marks" | tee -a $out
   100 echo "$marks" | tee -a $out