advent-of-code/2022-elixir/test/solutions/day_03_test.exs
Anders Ytterström 93d014893f Add solutions for 2022:3 Rucksack Reorganization
Cleaned up version. First one was a bit more spontanious.
2023-11-20 20:53:58 +01:00

30 lines
597 B
Elixir

defmodule Day03Test do
use ExUnit.Case
doctest Aoc.Solution.Day03
import Aoc.Solution.Day03
@input ~s(
vJrwpWtwJgWrhcsFMMfFFhFp
jqHRNqRjqzjGDLGLrsFMfFZSrLrFZsSL
PmmdzqPrVvPwwTWBwg
wMqvLMZHhHMvwLHjbvcjnnSBnvTQFn
ttgJtRGJQctTZtZT
CrZsJsPPZsGzwwsLwLmpwMDw
)
test "03: Rucksack Reorganization, part 1" do
expected = 157
result = @input |> parse!() |> solve()
assert result == expected
end
test "03: Rucksack Reorganization, part 2" do
expected = 70
result = @input |> parse!() |> solve_again()
assert result == expected
end
end