test: add unit test for part one

This commit is contained in:
2026-01-03 12:04:47 +01:00
parent 0d43b2e12c
commit a3135a6901

View File

@@ -0,0 +1,19 @@
package dayfive
import "testing"
var testInput = []int{
0,
3,
0,
1,
-3,
}
func TestPartOne(t *testing.T) {
expected := 5
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}