Files
advent-of-code-2025/cmd/04/main_test.go
T

48 lines
909 B
Go

package main_test
import (
"testing"
solution "github.com/StevanFreeborn/advent-of-code-2025/cmd/04"
)
func TestSolvePartOneWithExampleInput(t *testing.T) {
expected := 13
result := solution.SolvePartOne("EXAMPLE.txt")
if result != expected {
t.Errorf("got %d but wanted %d", result, expected)
}
}
func TestSolvePartOneWithInput(t *testing.T) {
expected := 1395
result := solution.SolvePartOne("INPUT.txt")
if result != expected {
t.Errorf("got %d but wanted %d", result, expected)
}
}
func TestSolvePartTwoWithExampleInput(t *testing.T) {
expected := 43
result := solution.SolvePartTwo("EXAMPLE.txt")
if result != expected {
t.Errorf("got %d but wanted %d", result, expected)
}
}
func TestSolvePartTwoWithInput(t *testing.T) {
expected := 8451
result := solution.SolvePartTwo("INPUT.txt")
if result != expected {
t.Errorf("got %d but wanted %d", result, expected)
}
}