refactor: massive refactor to have only one binary to call
This commit is contained in:
35
internal/2020/DayFive/code_test.go
Normal file
35
internal/2020/DayFive/code_test.go
Normal file
@@ -0,0 +1,35 @@
|
||||
package dayfive
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestPartOne(t *testing.T) {
|
||||
input := []string{
|
||||
"FBFBBFFRLR",
|
||||
"BFFFBBFRRR",
|
||||
"FFFBBBFRRR",
|
||||
"BBFFBBFRLL",
|
||||
}
|
||||
expected := 820
|
||||
got := PartOne(input)
|
||||
if got != expected {
|
||||
t.Errorf("PartOne() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPartTwo(t *testing.T) {
|
||||
input := []string{
|
||||
"FFFFFFFLLL",
|
||||
"FFFFFFFLLR",
|
||||
"FFFFFFFLRL",
|
||||
"FFFFFFFLRR",
|
||||
"FFFFFFFRLR",
|
||||
"FFFFFFFRRL",
|
||||
"FFFFFFFRRR",
|
||||
}
|
||||
expected := 4
|
||||
got := PartTwo(input)
|
||||
if got != expected {
|
||||
t.Errorf("PartTwo() = %d, want %d", got, expected)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user