refactor: massive refactor to have only one binary to call
This commit is contained in:
29
internal/2021/DayTwo/code_test.go
Normal file
29
internal/2021/DayTwo/code_test.go
Normal file
@@ -0,0 +1,29 @@
|
||||
package daytwo
|
||||
|
||||
import "testing"
|
||||
|
||||
var testInput = []string{
|
||||
"forward 5",
|
||||
"down 5",
|
||||
"forward 8",
|
||||
"up 3",
|
||||
"down 8",
|
||||
"forward 2",
|
||||
}
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
expected := 150
|
||||
got := PartOne(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPartTwo(t *testing.T) {
|
||||
expected := 900
|
||||
got := PartTwo(testInput)
|
||||
if got != expected {
|
||||
t.Errorf("PartTwo() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user