test: add unit test for part one

This commit is contained in:
2025-12-05 08:03:50 +01:00
parent d5146e7e3e
commit 79b31dad19

View File

@@ -0,0 +1,25 @@
package dayfive
import "testing"
var testInput = []string{
"3-5",
"10-14",
"16-20",
"12-18",
"",
"1",
"5",
"8",
"11",
"17",
"32",
}
func TestPartOne(t *testing.T) {
expected := 3
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}