2025-12-11 07:06:19 -06:00
|
|
|
package main_test
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
|
|
solution "github.com/StevanFreeborn/advent-of-code-2025/cmd/06"
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
func TestSolvePartOneWithExampleInput(t *testing.T) {
|
|
|
|
|
expected := 4277556
|
|
|
|
|
|
|
|
|
|
result := solution.SolvePartOne("EXAMPLE.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestSolvePartOneWithInput(t *testing.T) {
|
|
|
|
|
expected := 6169101504608
|
|
|
|
|
|
|
|
|
|
result := solution.SolvePartOne("INPUT.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|
2025-12-12 06:52:39 -06:00
|
|
|
|
|
|
|
|
func TestSolvePartTwoWithExampleInput(t *testing.T) {
|
|
|
|
|
expected := 3263827
|
|
|
|
|
|
|
|
|
|
result := solution.SolvePartTwo("EXAMPLE.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func TestSolvePartTwoWithInput(t *testing.T) {
|
|
|
|
|
expected := 10442199710797
|
|
|
|
|
|
|
|
|
|
result := solution.SolvePartTwo("INPUT.txt")
|
|
|
|
|
|
|
|
|
|
if result != expected {
|
|
|
|
|
t.Errorf("got %d but wanted %d", result, expected)
|
|
|
|
|
}
|
|
|
|
|
}
|