marking1/drumb_test7.scala
author Christian Urban <urbanc@in.tum.de>
Sat, 02 Feb 2019 13:28:05 +0000
changeset 261 8997430d9765
parent 260 b4812c877b05
child 268 e43f7e92ba26
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
260
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2000, 100) == 100)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2001, 100) == 27)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2002, 100) == 42)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2003, 100) == 27)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2004, 100) == 38)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2005, 100) == 113)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2006, 100) == 254)
b4812c877b05 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
assert(investment(List("GOOG", "AAPL", "BIDU"), 2000 to 2007, 100) == 349)
261
8997430d9765 updated
Christian Urban <urbanc@in.tum.de>
parents: 260
diff changeset
    10
assert(investment(List("GOOG", "AAPL", "BIDU"), 1990 to 2017, 100) == 83061)