marking/trade_test4.scala
changeset 65 f59e70e2ad82
parent 64 d6f97b562424
equal deleted inserted replaced
64:d6f97b562424 65:f59e70e2ad82
     1 //println("starting test now")
     1 //println("starting test now")
     2 
     2 
     3 
     3 
     4 assert(query_company("YHOO") == ("1996-07-24", "2000-01-03"))
     4 import scala.concurrent._
     5 assert(query_company("IBM") == ("1962-06-14", "2013-03-14"))
     5 import scala.concurrent.duration._
     6 assert(query_company("BIDU") == ("2006-02-07", "2014-11-11"))
     6 import ExecutionContext.Implicits.global
       
     7 import scala.language.postfixOps 
       
     8 
       
     9 lazy val f = Future {
       
    10   assert(query_company("YHOO") == ("1996-07-24", "2000-01-03"))
       
    11   assert(query_company("IBM") == ("1962-06-14", "2013-03-14"))
       
    12   assert(query_company("BIDU") == ("2006-02-07", "2014-11-11"))
       
    13 }
       
    14 
       
    15 Await.result(f, 120 second)