feat: ugh...this shouldn't be that hard
This commit is contained in:
@@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user