&special 3 Milestone 1
echo
dir=~cs1927/public_html/12s2/Assignments/Assignment01/automark
for f in allocator.h Test.hs run_test.sh
do
    cp $dir/$f .
done

testmax=10
testpassed=0
milestone=1
for i in 0 1 2 3 4 5 6 7 8 9
do
    let seed=i*7+milestone*8
    echo "** seed: $seed, milestone: $milestone"
    ./run_test.sh $seed $milestone
    test $? -eq 0 && let testpassed=testpassed+1
    echo
done

echo "There are $testmax tests. You passed $testpassed tests."
if [ $testpassed -ge $testmax ]
then
    echo "You are awesome!"
fi
echo

cat <<EOF
-- Marking Scheme --
Tests Pass Mark
       0    0
       1    1
       2    1.25
       3    1.5
       4    1.75
       5    2
       6    2.25
       7    2.5
       8    2.75
       9    2.9
      10    3
EOF
case $testpassed in
   0) MARK=0;;
   1) MARK=1;;
   2) MARK=1.25;;
   3) MARK=1.5;;
   4) MARK=1.75;;
   5) MARK=2;;
   6) MARK=2.25;;
   7) MARK=2.5;;
   8) MARK=2.75;;
   9) MARK=2.9;;
  10) MARK=3;;
esac

&end


CategoryGiveSpec

give.spec/Examples/special (last edited 2020-09-11 06:27:47 by MeichengWhale)