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