--- a/marking1/collatz_test.sh Sat Aug 29 16:05:59 2020 +0100
+++ b/marking1/collatz_test.sh Tue Oct 13 10:21:21 2020 +0100
@@ -88,7 +88,7 @@
if (scala_assert "collatz.scala" "collatz_test1.scala")
then
echo " --> success" | tee -a $out
- marks=$(( marks + 2 ))
+ marks=$(( marks + 1 ))
else
echo " --> one of the tests failed" | tee -a $out
fi
@@ -117,11 +117,28 @@
fi
fi
+### last-odd tests
+
+if [ $tsts -eq 0 ]
+then
+ echo " last_odd(113) == 85" | tee -a $out
+ echo " last_odd(84) == 21" | tee -a $out
+ echo " last_odd(605) == 341" | tee -a $out
+
+ if (scala_assert "collatz.scala" "collatz_test3.scala")
+ then
+ echo " --> success" | tee -a $out
+ marks=$(( marks + 1 ))
+ else
+ echo " --> one of the tests failed" | tee -a $out
+ fi
+fi
+
## final marks
echo >> $out
-echo "Overall mark for the Basic Part" | tee -a $out
+echo "Overall mark for the Preliminary Part" | tee -a $out
echo " $marks" | tee -a $out