day 3 tests

This commit is contained in:
Caleb Webber 2023-12-11 23:51:54 -05:00
parent 839613668c
commit a5afb8b355
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,10 @@
467..114..
...*......
..35..633.
......#...
617*......
.....+.58.
..592.....
......755.
...$.*....
.664.598..

16
test/2023_day3_test.exs Normal file
View file

@ -0,0 +1,16 @@
defmodule Day3Test do
use ExUnit.Case
test "part 1 should solve example input" do
{_, content} = File.read("./test/2023_day3_example.txt")
content = content |> String.split("\n")
assert Mix.Tasks.Day3.part1(content) == 4361
end
test "part 2 should solve example input" do
{_, content} = File.read("./test/2023_day3_example.txt")
content = content |> String.split("\n")
assert Mix.Tasks.Day3.part2(content) == 467_835
end
end