main_testing1/drumb_test2.scala
author Christian Urban <christian.urban@kcl.ac.uk>
Fri, 26 Apr 2024 17:35:36 +0100
changeset 486 9c03b5e89a2a
parent 402 de59aa20a1dc
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: 248
diff changeset
     1
/*def myassert(cond : => Boolean) = {
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     2
  try {
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     3
    assert(cond)
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     4
  } catch { 
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     5
    case _ : Throwable => System.exit(1)
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     6
  }
248
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     7
}
281
87b9e3e2c1a7 updated
Christian Urban <urbanc@in.tum.de>
parents: 248
diff changeset
     8
*/
248
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
     9
402
de59aa20a1dc updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 347
diff changeset
    10
assert(M1.get_first_price("GOOG", 1980) == None)
de59aa20a1dc updated
Christian Urban <christian.urban@kcl.ac.uk>
parents: 347
diff changeset
    11
assert(M1.get_first_price("GOOG", 2010) == Some(312.204773))
248
1616d06a0893 updared
Christian Urban <urbanc@in.tum.de>
parents: 199
diff changeset
    12