testing3/bf1a_test.scala
changeset 160 250e1d7df9ff
parent 153 316f9c6cc2ff
equal deleted inserted replaced
159:6ba27d7cf416 160:250e1d7df9ff
     1 
     1 
     2 import scala.concurrent._
     2 //import scala.concurrent._
     3 import scala.concurrent.duration._
     3 //import scala.concurrent.duration._
     4 import ExecutionContext.Implicits.global
     4 //import ExecutionContext.Implicits.global
     5 import scala.language.postfixOps 
     5 //import scala.language.postfixOps 
     6 import scala.language.reflectiveCalls
     6 //import scala.language.reflectiveCalls
     7 
     7 
     8 lazy val f = Future {
     8 //lazy val f = Future {
     9   import CW8b._
     9   import CW8b._
    10 
    10 
    11   assert(sread(Map(), 2) == 0)
    11   assert(sread(Map(), 2) == 0)
    12   assert(sread(Map(2 -> 1), 2) == 1)
    12   assert(sread(Map(2 -> 1), 2) == 1)
    13   assert(write(Map(), 1, 2) == Map(1 -> 2))
    13   assert(write(Map(), 1, 2) == Map(1 -> 2))
    14   assert(write(Map(1 -> 0), 1, 2) == Map(1 -> 2))
    14   assert(write(Map(1 -> 0), 1, 2) == Map(1 -> 2))
    15 }
    15 //}
    16 
    16 
    17 Await.result(f, 120 second)
    17 //Await.result(f, 120 second)