last 3 days

This commit is contained in:
Ben Charlton 2017-12-27 22:08:03 +00:00
parent acbd3aa664
commit c994c0ea41
5 changed files with 365 additions and 0 deletions

22
25/25_test.go Normal file
View file

@ -0,0 +1,22 @@
package main
import (
"testing"
)
var test = []instruction{
{"a", 0, 1, 1, "b"},
{"a", 1, 0, -1, "b"},
{"b", 0, 1, -1, "a"},
{"b", 1, 1, 1, "a"}}
func TestInstructions(t *testing.T) {
v := ProcessInstructions(test, 6)
if v != 3 {
t.Error(
"For", test,
"expected 3",
"got", v,
)
}
}