testing5/bf_test3.scala
author Christian Urban <urbanc@in.tum.de>
Thu, 06 Dec 2018 21:49:43 +0000
changeset 236 e461b5325b5e
parent 235 testing5/bf1b_test.scala@c989f50da5de
child 243 9bb36426c781
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
236
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     2
assert(jumpRight("[******]***", 1, 0) == 8)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     3
assert(jumpRight("[**[*]*]***", 1, 0) == 8)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     4
assert(jumpRight("[**[*]*]***", 1, 0) == 8)  
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     5
assert(jumpRight("[**[***]***", 1, 0) == 11)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     6
assert(jumpRight("[*[][]*]***", 1, 0) == 8)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     7
assert(jumpLeft("[******]***", 6, 0) == 1)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     8
assert(jumpLeft("[******]***", 7, 0) == -1)
e461b5325b5e updated
Christian Urban <urbanc@in.tum.de>
parents: 235
diff changeset
     9
assert(jumpLeft("[*[][]*]***", 6, 0) == 1)