test: add unit test for p1
This commit is contained in:
24
internal/2025/DayEleven/code_test.go
Normal file
24
internal/2025/DayEleven/code_test.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package dayeleven
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
"aaa: you hhh",
|
||||
"you: bbb ccc",
|
||||
"bbb: ddd eee",
|
||||
"ccc: ddd eee fff",
|
||||
"ddd: ggg",
|
||||
"eee: out",
|
||||
"fff: out",
|
||||
"ggg: out",
|
||||
"hhh: ccc fff iii",
|
||||
"iii: out",
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 5
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user