Files
advent-of-code/internal/2022/DayOne/code_test.go
2025-11-26 16:05:00 +01:00

37 lines
493 B
Go

package dayone
import "testing"
var testInput = []string{
"1000",
"2000",
"3000",
"",
"4000",
"",
"5000",
"6000",
"",
"7000",
"8000",
"9000",
"",
"10000",
}
func TestPartOne(t *testing.T) {
expected := 24000
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}
func TestPartTwo(t *testing.T) {
expected := 45000
got := PartTwo(testInput)
if got != expected {
t.Errorf("PartTwo() = %d, want %d", got, expected)
}
}