130 |
130 |
131 ### investment_test |
131 ### investment_test |
132 |
132 |
133 if [ $tsts -eq 0 ] |
133 if [ $tsts -eq 0 ] |
134 then |
134 then |
135 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2000, 100) == 100" | tee -a $out |
135 echo -e " All results need to be in the range of -/+ 1% of the given values." | tee -a $out |
136 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2001, 100) == 27 " | tee -a $out |
136 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2000, 100) == 100" | tee -a $out |
137 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2002, 100) == 42 " | tee -a $out |
137 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2001, 100) == 27 " | tee -a $out |
138 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2003, 100) == 27 " | tee -a $out |
138 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2002, 100) == 42 " | tee -a $out |
139 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2004, 100) == 38 " | tee -a $out |
139 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2003, 100) == 27 " | tee -a $out |
140 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2005, 100) == 113" | tee -a $out |
140 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2004, 100) == 38 " | tee -a $out |
141 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2006, 100) == 254" | tee -a $out |
141 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2005, 100) == 113" | tee -a $out |
142 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2007, 100) == 349" | tee -a $out |
142 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2006, 100) == 254" | tee -a $out |
143 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 1990 to 2017, 100) == 83061" | tee -a $out |
143 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 2000 to 2007, 100) == 349" | tee -a $out |
|
144 echo -e " investment(List(\"GOOG\", \"AAPL\", \"BIDU\"), 1990 to 2017, 100) == 83061" | tee -a $out |
|
145 |
144 |
146 |
145 if (scala_assert "drumb.scala" "drumb_test7.scala") |
147 if (scala_assert "drumb.scala" "drumb_test7.scala") |
146 then |
148 then |
147 echo " --> success" | tee -a $out |
149 echo " --> success" | tee -a $out |
148 marks=$(( marks + 1 )) |
150 marks=$(( marks + 1 )) |