main_testing5/bf_test3.scala
changeset 475 59e005dcf163
parent 404 bf20a9fa5c29
equal deleted inserted replaced
474:b528d1d3d3c3 475:59e005dcf163
     1 import M5a._
       
     2 
     1 
     3 assert(jumpRight("[xxxxxx]xxx", 1, 0) == 8)
     2 def urbanmain() = {
     4 assert(jumpRight("[xx[x]x]xxx", 1, 0) == 8)
     3 
     5 assert(jumpRight("[xx[x]x]xxx", 1, 0) == 8)  
     4   import M5a._
     6 assert(jumpRight("[xx[xxx]xxx", 1, 0) == 11)
     5 
     7 assert(jumpRight("[x[][]x]xxx", 1, 0) == 8)
     6   assert(jumpRight("[xxxxxx]xxx", 1, 0) == 8)
     8 assert(jumpLeft("[xxxxxx]xxx", 6, 0) == 1)
     7   assert(jumpRight("[xx[x]x]xxx", 1, 0) == 8)
     9 assert(jumpLeft("[xxxxxx]xxx", 7, 0) == -1)
     8   assert(jumpRight("[xx[x]x]xxx", 1, 0) == 8)  
    10 assert(jumpLeft("[x[][]x]xxx", 6, 0) == 1)
     9   assert(jumpRight("[xx[xxx]xxx", 1, 0) == 11)
       
    10   assert(jumpRight("[x[][]x]xxx", 1, 0) == 8)
       
    11   assert(jumpLeft("[xxxxxx]xxx", 6, 0) == 1)
       
    12   assert(jumpLeft("[xxxxxx]xxx", 7, 0) == -1)
       
    13   assert(jumpLeft("[x[][]x]xxx", 6, 0) == 1)
       
    14 }