marking/drumb_test2.scala
changeset 169 8a1bd8ddb96c
parent 99 2b7a2dc0e18f
equal deleted inserted replaced
168:bb69fdebf05a 169:8a1bd8ddb96c
     1 //println("starting test now")
       
     2 
       
     3 import scala.concurrent._
       
     4 import scala.concurrent.duration._
       
     5 import ExecutionContext.Implicits.global
       
     6 import scala.language.postfixOps 
       
     7 
     1 
     8 val urban_prices = List(List(Some(71.539941), None), 
     2 val urban_prices = List(List(Some(71.539941), None), 
     9                         List(Some(76.974614), None), 
     3                         List(Some(76.974614), None), 
    10                         List(Some(65.226685), Some(6.35)), 
     4                         List(Some(65.226685), Some(6.35)), 
    11                         List(Some(78.354649), Some(12.241)), 
     5                         List(Some(78.354649), Some(12.241)), 
    15                         List(Some(-0.152620823795232), None), 
     9                         List(Some(-0.152620823795232), None), 
    16                         List(Some(0.20126676681483952), Some(0.9277165354330709)), 
    10                         List(Some(0.20126676681483952), Some(0.9277165354330709)), 
    17                         List(Some(0.09141762603007778), Some(2.119679764725104)))
    11                         List(Some(0.09141762603007778), Some(2.119679764725104)))
    18 
    12 
    19 
    13 
    20 lazy val f = Future {
    14 assert (get_deltas(get_prices(List("IBM", "BIDU"), 2004 to 2008)) == urban_deltas)
    21   //assert(get_deltas(urban_prices) == urban_deltas)
       
    22   assert (get_deltas(get_prices(List("IBM", "BIDU"), 2004 to 2008)) == urban_deltas)
       
    23 }
       
    24 
    15 
    25 
       
    26 Await.result(f, 180 second)
       
    27