equal
deleted
inserted
replaced
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 |
63 fi |
63 fi |
64 else |
64 else |
65 tsts1=$(( 1 )) |
65 tsts1=$(( 1 )) |
66 fi |
66 fi |
67 |
67 |
|
68 if [ $tsts1 -eq 0 ] |
|
69 then |
|
70 echo " ordered_moves(8, List((3,4), (3,2)), (1, 3)) == List((0,1), (0,5), (2,1), (2,5))" | tee -a $out |
|
71 echo " ordered_moves(8, List((4,0)), (0,0)) == List((2,1), (1,2))" | tee -a $out |
|
72 echo " ordered_moves(8, List((0,4)), (0,0)) == List((1,2), (2,1))" | tee -a $out |
|
73 |
|
74 if (scala_assert "knight3.scala.bak" "../../../marking/knight3a_test.scala") |
|
75 then |
|
76 echo " --> success" | tee -a $out |
|
77 marks=$(( marks + 1 )) |
|
78 else |
|
79 echo " --> test failed" | tee -a $out |
|
80 fi |
|
81 fi |
68 |
82 |
69 |
83 |
70 |
84 |
71 |
85 |
72 ## final marks |
86 ## final marks |