last 3 days
This commit is contained in:
parent
acbd3aa664
commit
c994c0ea41
5 changed files with 365 additions and 0 deletions
22
25/25_test.go
Normal file
22
25/25_test.go
Normal 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,
|
||||
)
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue