marking1/drumb_test2.scala
changeset 268 e43f7e92ba26
parent 210 63a1376cbebd
child 281 87b9e3e2c1a7
equal deleted inserted replaced
267:9e0216756771 268:e43f7e92ba26
       
     1 def myassert(cond : => Boolean) = {
       
     2   try {
       
     3     assert(cond)
       
     4   } catch { 
       
     5     case _ : Throwable => System.exit(1)
       
     6   }
       
     7 }
     1 
     8 
     2 assert(get_first_price("GOOG", 1980) == None)
     9 myassert(get_first_price("GOOG", 1980) == None)
     3 
    10 
     4 assert(get_first_price("GOOG", 2010) == Some(311.349976))
    11 myassert(get_first_price("GOOG", 2010) == Some(312.204773))
     5 
    12