mirror of
https://github.com/rjNemo/ai_advent_code_2024
synced 2026-06-06 02:26:44 +00:00
feat: Add test for part 2 README example in Day03
This commit is contained in:
parent
e1f4afe639
commit
a4d9ba205a
1 changed files with 6 additions and 1 deletions
|
|
@ -73,7 +73,12 @@ defmodule AdventCode2024.Solutions.Day03Test do
|
||||||
|
|
||||||
test "ignores invalid control instructions" do
|
test "ignores invalid control instructions" do
|
||||||
input = "mul(2,4)dont()mul(5,5)doo()mul(3,3)"
|
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
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue