test: add unit test for part one
This commit is contained in:
15
internal/2016/DayTwo/code_test.go
Normal file
15
internal/2016/DayTwo/code_test.go
Normal file
@@ -0,0 +1,15 @@
|
||||
package daytwo
|
||||
|
||||
import (
|
||||
"testing"
|
||||
)
|
||||
|
||||
var testInput = []string{"ULL", "RRDDD", "LURDL", "UUUUD"}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 1985
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user