Files
advent-of-code/internal/2020/DayEight/code_test.go
2025-11-28 15:26:30 +01:00

32 lines
476 B
Go

package dayeight
import "testing"
var testInput = []string{
"nop +0",
"acc +1",
"jmp +4",
"acc +3",
"jmp -3",
"acc -99",
"acc +1",
"jmp -4",
"acc +6",
}
func TestPartOne(t *testing.T) {
expected := 5
got := PartOne(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}
func TestPartTwo(t *testing.T) {
expected := 8
got := PartTwo(testInput)
if got != expected {
t.Errorf("PartOne() = %d, want %d", got, expected)
}
}