test: add unit test for p1

This commit is contained in:
2025-11-30 12:50:33 +01:00
parent e5a1504f6b
commit c6dc950d3f

View File

@@ -0,0 +1,21 @@
package daytwo
import "testing"
var testInput = []string{
"abcdef",
"bababc",
"abbcde",
"abcccd",
"aabcdd",
"abcdee",
"ababab",
}
func TestPartOne(t *testing.T) {
expected := 12
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}