testing1/drumb_test7.scala
author Christian Urban <urbanc@in.tum.de>
Tue, 22 Jan 2019 12:53:05 +0000
changeset 258 ebe71908b13e
parent 248 1616d06a0893
child 281 87b9e3e2c1a7
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
130
7f3f01dfe738 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
248
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     2
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2000, 100) == 100)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     3
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2001, 100) == 27)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     4
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     5
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     6
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     7
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100) == 113)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     8
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100) == 254)
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     9
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100) == 349)