marking1/drumb_test7.scala
changeset 260 b4812c877b05
child 261 8997430d9765
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/marking1/drumb_test7.scala	Sat Feb 02 01:21:43 2019 +0000
@@ -0,0 +1,9 @@
+
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2000, 100) == 100)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2001, 100) == 27)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100) == 113)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100) == 254)
+assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100) == 349)