updated
authorChristian Urban <urbanc@in.tum.de>
Tue, 22 Nov 2016 01:35:40 +0000
changeset 65 f59e70e2ad82
parent 64 d6f97b562424
child 66 3506b681c191
updated
marking/trade_test4.scala
--- a/marking/trade_test4.scala	Mon Nov 21 19:23:37 2016 +0000
+++ b/marking/trade_test4.scala	Tue Nov 22 01:35:40 2016 +0000
@@ -1,6 +1,15 @@
 //println("starting test now")
 
 
-assert(query_company("YHOO") == ("1996-07-24", "2000-01-03"))
-assert(query_company("IBM") == ("1962-06-14", "2013-03-14"))
-assert(query_company("BIDU") == ("2006-02-07", "2014-11-11"))
+import scala.concurrent._
+import scala.concurrent.duration._
+import ExecutionContext.Implicits.global
+import scala.language.postfixOps 
+
+lazy val f = Future {
+  assert(query_company("YHOO") == ("1996-07-24", "2000-01-03"))
+  assert(query_company("IBM") == ("1962-06-14", "2013-03-14"))
+  assert(query_company("BIDU") == ("2006-02-07", "2014-11-11"))
+}
+
+Await.result(f, 120 second)