test: add unit test for part one

This commit is contained in:
2025-12-03 09:28:42 +01:00
parent 146b63706a
commit c1ba2ca02b

View File

@@ -0,0 +1,18 @@
package daythree
import "testing"
var testInput = []string{
"987654321111111",
"811111111111119",
"234234234234278",
"818181911112111",
}
func TestPartOne(t *testing.T) {
expected := 357
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}