equal
deleted
inserted
replaced
|
1 |
|
2 import CW8b._ |
|
3 |
|
4 assert(start("[-]", Map(0 -> 100)) == Map(0 -> 0)) |
|
5 assert(start("[->+<]", Map(0 -> 10)) == Map(0 -> 0, 1 -> 10)) |
|
6 assert(start("[>>+>>+<<<<-]", Map(0 -> 42)) == Map(0 -> 0, 2 -> 42, 4 -> 42)) |
|
7 assert(start("""++++++++[>++++[>++>+++>+++>+<<<<-]>+>+>->>+[<] |
|
8 <-]>>.>---.+++++++..+++.>>.<-.<.+++.------.--------.>>+.>++.""", Map()) == Map(0 -> 0, 5 -> 33, 1 -> 0, 6 -> 10, 2 -> 72, 3 -> 100, 4 -> 87)) |
|
9 assert(start("+++++[->++++++++++<]>--<+++[->>++++++++++<<]>>++<<----------[+>.>.<+<]", Map()) == Map(0 -> 0, 1 -> 58, 2 -> 32)) |