testing5/bf1b_test.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 06 Dec 2018 18:56:26 +0000
changeset 235 c989f50da5de
permissions -rw-r--r--
updated
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
235
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
//import scala.concurrent._
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
//import scala.concurrent.duration._
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
//import ExecutionContext.Implicits.global
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
//import scala.language.postfixOps 
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
//import scala.language.reflectiveCalls
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
//lazy val f = Future {
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
  import CW8b._
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
  assert(jumpRight("[******]***", 1, 0) == 8)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
  assert(jumpRight("[**[*]*]***", 1, 0) == 8)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
  assert(jumpRight("[**[*]*]***", 1, 0) == 8)  
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
  assert(jumpRight("[**[***]***", 1, 0) == 11)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
  assert(jumpRight("[*[][]*]***", 1, 0) == 8)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    16
  assert(jumpLeft("[******]***", 6, 0) == 1)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    17
  assert(jumpLeft("[******]***", 7, 0) == -1)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    18
  assert(jumpLeft("[*[][]*]***", 6, 0) == 1)
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    19
//}
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    20
c989f50da5de updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    21
//Await.result(f, 120 second)