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

71 lines
1.5 KiB
Go
Raw Normal View History

2025-12-21 05:39:28 -06:00
package main_test
import (
2025-12-22 07:34:39 -06:00
"fmt"
2025-12-21 05:39:28 -06:00
"testing"
solution "github.com/StevanFreeborn/advent-of-code-2025/cmd/11"
)
func TestSolvePartOneWithExampleInput(t *testing.T) {
expected := 5
2025-12-22 07:34:39 -06:00
result := solution.SolvePartOne("EXAMPLE_ONE.txt")
2025-12-21 05:39:28 -06:00
if result != expected {
2025-12-22 07:34:39 -06:00
t.Errorf("SolvePartOne(EXAMPLE_ONE.txt) = %d; want %d", result, expected)
2025-12-21 05:39:28 -06:00
}
}
func TestSolvePartOneWithInput(t *testing.T) {
expected := 599
result := solution.SolvePartOne("INPUT.txt")
if result != expected {
t.Errorf("SolvePartOne(INPUT.txt) = %d; want %d", result, expected)
}
}
2025-12-22 07:34:39 -06:00
func TestSolvePartTwoWithExampleInput(t *testing.T) {
expected := 2
result := solution.SolvePartTwo("EXAMPLE_TWO.txt")
if result != expected {
t.Errorf("SolvePartTwo(EXAMPLE_TWO.txt) = %d; want %d", result, expected)
}
}
func TestSolvePartTwoWithInput(t *testing.T) {
expected := -1
fmt.Println("HERE")
result := solution.SolvePartTwo("INPUT.txt")
if result != expected {
t.Errorf("SolvePartTwo(INPUT.txt) = %d; want %d", result, expected)
}
}
2025-12-22 08:30:19 -06:00
func TestSolvePartTwoAgainWithExampleInput(t *testing.T) {
expected := 2
result := solution.SolvePartTwoAgain("EXAMPLE_TWO.txt")
if result != expected {
t.Errorf("SolvePartTwoAgain(EXAMPLE_TWO.txt) = %d; want %d", result, expected)
}
}
func TestSolvePartTwoAgainWithInput(t *testing.T) {
expected := -1
result := solution.SolvePartTwoAgain("INPUT.txt")
if result != expected {
t.Errorf("SolvePartTwoAgain(INPUT.txt) = %d; want %d", result, expected)
}
}