feat: ugh...this shouldn't be that hard

This commit is contained in:
Stevan Freeborn
2025-12-02 07:18:38 -06:00
parent e7c180de4b
commit d61a630607
5 changed files with 111 additions and 4 deletions
+26
View File
@@ -25,3 +25,29 @@ func TestSolvePartOneWithInput(t *testing.T) {
t.Errorf(`SolvePartOne("INPUT.txt") = %d; want %d`, result, expected)
}
}
func TestSolvePartTwoWithExampleInput(t *testing.T) {
expected := 6
result := solution.SolvePartTwo("EXAMPLE.txt")
if result != expected {
t.Errorf(`SolvePartTwo("EXAMPLE.txt") = %d; want %d`, result, expected)
}
}
func TestSolvePartTwoWithInput(t *testing.T) {
expected := -1
tooLow := 5849
tooHigh := 5967
result := solution.SolvePartTwo("INPUT.txt")
if result <= tooLow || result >= tooHigh {
t.Errorf(`SolvePartTwo("INPUT.txt") = %d; want something between %d and %d`, result, tooLow, tooHigh)
}
if result != expected {
t.Errorf(`SolvePartTwo("INPUT.txt") = %d; want %d`, result, expected)
}
}