test: design unit test for part one

This commit is contained in:
2025-12-01 07:20:12 +01:00
parent b7a7bfb5c7
commit 2d3828c55d

View File

@@ -0,0 +1,24 @@
package dayone
import "testing"
var testInput = []string{
"L68",
"L30",
"R48",
"L5",
"R60",
"L55",
"L1",
"L99",
"R14",
"L82",
}
func TestPartOne(t *testing.T) {
expected := 3
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}