15 lines
292 B
Go
15 lines
292 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"strings"
|
||
|
"testing"
|
||
|
|
||
|
"github.com/stretchr/testify/assert"
|
||
|
)
|
||
|
|
||
|
func Test(t *testing.T) {
|
||
|
input := `forward 5,down 5,forward 8,up 3,down 8,forward 2`
|
||
|
assert.Equal(t, 150, puzzle1(strings.Split(input, ",")))
|
||
|
assert.Equal(t, 900, puzzle2(strings.Split(input, ",")))
|
||
|
}
|