--- a/marking1/drumb_test7.scala Tue Feb 04 11:20:31 2020 +0000
+++ b/marking1/drumb_test7.scala Tue Feb 04 14:15:42 2020 +0000
@@ -13,7 +13,12 @@
assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
-assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100) == 113)
-assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100) == 254)
-assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100) == 349)
-assert(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 1990 to 2017, 100) == 11504)
+
+// 113
+assert((112 to 114).contains(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100)))
+// 254
+assert((252 to 256).contains(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100)))
+// 349
+assert((346 to 352).contains(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100)))
+//11504
+assert((11389 to 11619).contains(CW6b.investment(List("GOOG", "AAPL", "BIDU"), 1990 to 2017, 100)))