test: add unit test for part one

This commit is contained in:
2025-12-02 20:13:01 +01:00
parent 8eafb1f7c5
commit ce7d42621f

View File

@@ -0,0 +1,18 @@
package dayeight
import "testing"
var testInput = []string{
`""`,
`"abc"`,
`"aaa\"aaa"`,
`"\x27"`,
}
func TestPartOne(t *testing.T) {
expected := 12
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}