marking1/drumb_test3.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Wed, 04 Nov 2020 14:46:03 +0000
changeset 349 682611a0fb89
parent 281 87b9e3e2c1a7
permissions -rw-r--r--
updated jars
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
     1
/*def myassert(cond : => Boolean) = {
268
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     2
  try {
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     3
    assert(cond)
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     4
  } catch { 
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     5
    case _ : Throwable => System.exit(1)
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     6
  }
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
     7
}
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
     8
*/
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
     9
assert(CW6b.get_prices(List("BIDU"), 2004 to 2008) ==
268
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    10
   List(List(None), List(None), List(Some(6.35)), 
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    11
        List(Some(12.241)), List(Some(38.188))))
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    12
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    13
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    14
assert(CW6b.get_prices(List("GOOG", "AAPL"), 2010 to 2012) ==
268
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    15
   List(List(Some(312.204773), Some(26.782711)), 
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    16
        List(Some(301.0466), Some(41.244694)), 
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    17
        List(Some(331.462585), Some(51.464207))))