testing3/testing3-bak/knight3a_test.scala
author Christian Urban <urbanc@in.tum.de>
Fri, 14 Dec 2018 14:41:54 +0000
changeset 245 975d34506e88
parent 204 testing3-bak/knight3a_test.scala@9b45dd24271b
permissions -rw-r--r--
added marking
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
145
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     1
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     2
import scala.concurrent._
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     3
import scala.concurrent.duration._
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     4
import ExecutionContext.Implicits.global
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     5
import scala.language.postfixOps 
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     6
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     7
lazy val f = Future {
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     8
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
     9
assert(CW7c.ordered_moves(8, List((3,4), (3,2)), (1, 3)) == List((0,1), (0,5), (2,1), (2,5)))
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    10
assert(CW7c.ordered_moves(8, List((4,0)), (0,0)) == List((2,1), (1,2)))
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    11
assert(CW7c.ordered_moves(8, List((0,4)), (0,0)) == List((1,2), (2,1)))
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    12
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    13
}
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    14
d306102fd33b updated
Christian Urban <urbanc@in.tum.de>
parents:
diff changeset
    15
Await.result(f, 120 second)