test: add unit test for p1

This commit is contained in:
2026-02-03 16:02:17 +01:00
parent 9ae920d6a8
commit a6eb8f9f22

View File

@@ -0,0 +1,24 @@
package dayeleven
import "testing"
var testInput = []string{
"aaa: you hhh",
"you: bbb ccc",
"bbb: ddd eee",
"ccc: ddd eee fff",
"ddd: ggg",
"eee: out",
"fff: out",
"ggg: out",
"hhh: ccc fff iii",
"iii: out",
}
func TestPartOne(t *testing.T) {
expected := 5
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}