defmodule Load do
def input do
File.read!("day1.txt")
end
end
defmodule Part1 do
def run(input) do
###
end
end
defmodule Part2 do
def run(input) do
###
end
end
ExUnit.start(autorun: false)
defmodule Test do
use ExUnit.Case, async: true
@example_input ~s(
1000
2000
3000
4000
5000
6000
7000
8000
9000
10000
)
@input Load.input()
test "part 1 example" do
assert Part1.run(@example_input) === 24000
end
test "part 1" do
assert Part1.run(@input) === 0
end
test "part 2 example" do
assert Part2.run(@example_input) === 45000
end
test "part 2" do
assert Part2.run(@input) === 0
end
end
ExUnit.run()