2025-12-19 07:42:00 -06:00
|
|
|
package main_test
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
solution "github.com/StevanFreeborn/advent-of-code-2025/cmd/10"
|
|
|
|
|
)
|
|
|
|
|
|
2025-12-20 07:03:12 -06:00
|
|
|
func TestSolvePartOneWithExampleInput(t *testing.T) {
|
|
|
|
|
expected := 7
|
2025-12-19 07:42:00 -06:00
|
|
|
|
|
|
|
|
result := solution.SolvePartOne("EXAMPLE.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-20 07:03:12 -06:00
|
|
|
|
|
|
|
|
func TestSolvePartOneWithInput(t *testing.T) {
|
2025-12-20 13:20:49 -06:00
|
|
|
expected := 527
|
2025-12-20 07:03:12 -06:00
|
|
|
|
|
|
|
|
result := solution.SolvePartOne("INPUT.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|