|
@ -19,12 +19,13 @@ func TestDay01(t *testing.T) { |
|
|
3 3` |
|
|
3 3` |
|
|
|
|
|
|
|
|
p1, p2 := dup(input) |
|
|
p1, p2 := dup(input) |
|
|
|
|
|
solver := Day1{} |
|
|
|
|
|
|
|
|
if got, expected := part1(p1), "11"; got != expected { |
|
|
if got, expected := solver.Part1(p1), "11"; got != expected { |
|
|
t.Errorf("day01 part 1 = %s; expected %s", got, expected) |
|
|
t.Errorf("day01 part 1 = %s; expected %s", got, expected) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
if got, expected := part2(p2), "31"; got != expected { |
|
|
if got, expected := solver.Part2(p2), "31"; got != expected { |
|
|
t.Errorf("day01 part 2 = %s; expected %s", got, expected) |
|
|
t.Errorf("day01 part 2 = %s; expected %s", got, expected) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
@ -38,7 +39,6 @@ func TestDay02(t *testing.T) { |
|
|
1 3 6 7 9` |
|
|
1 3 6 7 9` |
|
|
|
|
|
|
|
|
p1, p2 := dup(input) |
|
|
p1, p2 := dup(input) |
|
|
|
|
|
|
|
|
solver := Day2{} |
|
|
solver := Day2{} |
|
|
|
|
|
|
|
|
if got, expected := solver.Part1(p1), "2"; got != expected { |
|
|
if got, expected := solver.Part1(p1), "2"; got != expected { |
|
|