Compare commits

...

1 commit
main ... day3

Author SHA1 Message Date
a4d9ba205a
feat: Add test for part 2 README example in Day03 2024-12-03 14:27:22 +01:00

View file

@ -73,7 +73,12 @@ defmodule AdventCode2024.Solutions.Day03Test do
test "ignores invalid control instructions" do
input = "mul(2,4)dont()mul(5,5)doo()mul(3,3)"
assert Day03.solve_part2(input) == {:ok, 38}
assert Day03.solve_part2(input) == {:ok, 42}
end
test "solves README example for part 2" do
input = "xmul(2,4)&mul[3,7]!^don't()_mul(5,5)+mul(32,64](mul(11,8)undo()?mul(8,5))"
assert Day03.solve_part2(input) == {:ok, 48}
end
end
end