marking1/drumb_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Sat, 14 Jan 2023 14:13:16 +0000
changeset 459 d59404a41d5f
parent 281 87b9e3e2c1a7
permissions -rw-r--r--
updated
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
*/
158
94b11ac19b41 updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    10
assert(CW6b.get_first_price("GOOG", 1980) == None)
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 268
diff changeset
    11
assert(CW6b.get_first_price("GOOG", 2010) == Some(312.204773))
268
e43f7e92ba26 updated
Christian Urban <urbanc@in.tum.de>
parents: 210
diff changeset
    12