31 lines
541 B
Go
31 lines
541 B
Go
package dayseven
|
|
|
|
import "testing"
|
|
|
|
var testInput = []string{
|
|
".......S.......",
|
|
"...............",
|
|
".......^.......",
|
|
"...............",
|
|
"......^.^......",
|
|
"...............",
|
|
".....^.^.^.....",
|
|
"...............",
|
|
"....^.^...^....",
|
|
"...............",
|
|
"...^.^...^.^...",
|
|
"...............",
|
|
"..^...^.....^..",
|
|
"...............",
|
|
".^.^.^.^.^...^.",
|
|
"...............",
|
|
}
|
|
|
|
func TestPartOne(t *testing.T) {
|
|
expected := 21
|
|
got := PartOne(testInput)
|
|
if got != expected {
|
|
t.Errorf("PartOne() = %d, want %d", got, expected)
|
|
}
|
|
}
|