test: add unit test for part one

This commit is contained in:
2025-12-08 21:45:27 +01:00
parent a8e244f9ab
commit 6777696df6

View File

@@ -0,0 +1,20 @@
package daythree
import "testing"
var testInput = []string{
"vJrwpWtwJgWrhcsFMMfFFhFp",
"jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL",
"PmmdzqPrVvPwwTWBwg",
"wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn",
"ttgJtRGJQctTZtZT",
"CrZsJsPPZsGzwwsLwLmpwMDw",
}
func TestPartOne(t *testing.T) {
expected := 157
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}