test: add unit test for part one

This commit is contained in:
2025-11-25 22:44:46 +01:00
parent ce1cc9d5cf
commit 497314aa8b

29
2020/day06/main_test.go Normal file
View File

@@ -0,0 +1,29 @@
package main
import "testing"
var input = []string{
"abc",
"",
"a",
"b",
"c",
"",
"ab",
"ac",
"",
"a",
"a",
"a",
"a",
"",
"b",
}
func TestPartOne(t *testing.T) {
expected := 11
got := PartOne(input)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}