marking/mark01b
changeset 99 e10a9b2fd35a
parent 86 f8a781322499
equal deleted inserted replaced
98:8f03f0dc3065 99:e10a9b2fd35a
     1 #!/bin/bash
     1 #!/bin/bash
     2 set -e
     2 set -e
     3 
     3 
     4 out=${1:-output}
     4 out=${1:-output2}
     5 
     5 
     6 echo "" > $out
     6 echo "" > $out
     7 
     7 
     8 echo "Below is the feedback and provisional mark for your submission" >> $out
     8 echo "Below is the feedback and provisional mark for your submission" >> $out
     9 echo "for assignment 6 (Part 3).  Please note all marks are provisional until" >> $out
     9 echo "for assignment 6 (Part 3).  Please note all marks are provisional until" >> $out
    53 then
    53 then
    54   echo "  get_prices(List(\"BIDU\"), 2004 to 2008) =" | tee -a $out
    54   echo "  get_prices(List(\"BIDU\"), 2004 to 2008) =" | tee -a $out
    55   echo "  List(List(None), List(None), List(Some(6.35))," | tee -a $out
    55   echo "  List(List(None), List(None), List(Some(6.35))," | tee -a $out
    56   echo "       List(Some(12.241)), List(Some(38.188)))" | tee -a $out
    56   echo "       List(Some(12.241)), List(Some(38.188)))" | tee -a $out
    57 
    57 
    58   if (scala_assert "drumb.scala" "../drumb_test1.scala")
    58   if (scala_assert "drumb.scala" "../../../marking/drumb_test1.scala")
    59   then
    59   then
    60     echo "  --> success" | tee -a $out
    60     echo "  --> success" | tee -a $out
    61     marks=$(( marks + 1 ))
    61     marks=$(( marks + 1 ))
    62   else
    62   else
    63     echo "  --> test failed" | tee -a $out
    63     echo "  --> test failed" | tee -a $out
    72   echo "  List(List(Some(0.07596697626574789), None), " | tee -a $out
    72   echo "  List(List(Some(0.07596697626574789), None), " | tee -a $out
    73   echo "       List(Some(-0.152620823795232), None)," | tee -a $out
    73   echo "       List(Some(-0.152620823795232), None)," | tee -a $out
    74   echo "       List(Some(0.20126676681483952), Some(0.9277165354330709))," | tee -a $out
    74   echo "       List(Some(0.20126676681483952), Some(0.9277165354330709))," | tee -a $out
    75   echo "       List(Some(0.09141762603007778), Some(2.119679764725104)))" | tee -a $out
    75   echo "       List(Some(0.09141762603007778), Some(2.119679764725104)))" | tee -a $out
    76   
    76   
    77   if (scala_assert "drumb.scala" "../drumb_test2.scala") 
    77   if (scala_assert "drumb.scala" "../../../marking/drumb_test2.scala") 
    78   then
    78   then
    79     echo "  --> success" | tee -a $out
    79     echo "  --> success" | tee -a $out
    80     marks=$(( marks + 1 ))
    80     marks=$(( marks + 1 ))
    81   else
    81   else
    82     echo "  --> test failed" | tee -a $out
    82     echo "  --> test failed" | tee -a $out
    91   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 1) -  85).abs <= 2 " | tee -a $out
    91   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 1) -  85).abs <= 2 " | tee -a $out
    92   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 2) - 156).abs <= 2 " | tee -a $out
    92   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 2) - 156).abs <= 2 " | tee -a $out
    93   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 3) - 210).abs <= 2 " | tee -a $out
    93   echo "  yearly_yield(IBM + BIDU, 04 - 08, 100, 3) - 210).abs <= 2 " | tee -a $out
    94   echo "  investment(List(\"IBM\", \"BIDU\"), 2004 to 2008, 100) - 298).abs <= 10" | tee -a $out
    94   echo "  investment(List(\"IBM\", \"BIDU\"), 2004 to 2008, 100) - 298).abs <= 10" | tee -a $out
    95   
    95   
    96   if (scala_assert "drumb.scala" "../drumb_test3.scala") 
    96   if (scala_assert "drumb.scala" "../../../marking/drumb_test3.scala") 
    97   then
    97   then
    98     echo "  --> success" | tee -a $out
    98     echo "  --> success" | tee -a $out
    99     marks=$(( marks + 1 ))
    99     marks=$(( marks + 1 ))
   100   else
   100   else
   101     echo "  --> test failed" | tee -a $out
   101     echo "  --> test failed" | tee -a $out