2022-09-21 09:19:53 -04:00
|
|
|
defmodule AdventOfCode.Day02.Part2Test do
|
|
|
|
use AdventOfCode.PuzzleCase, module: AdventOfCode.Day02.Part2
|
|
|
|
|
2022-09-21 09:19:53 -04:00
|
|
|
test "returns the product of horizontal position and depth" do
|
2022-09-21 09:19:53 -04:00
|
|
|
input = ~S"""
|
2022-09-21 09:19:53 -04:00
|
|
|
forward 5
|
|
|
|
down 5
|
|
|
|
forward 8
|
|
|
|
up 3
|
|
|
|
down 8
|
|
|
|
forward 2
|
2022-09-21 09:19:53 -04:00
|
|
|
"""
|
|
|
|
|
2022-09-21 09:19:53 -04:00
|
|
|
assert_solution(input, 900)
|
2022-09-21 09:19:53 -04:00
|
|
|
end
|
2022-09-21 09:19:53 -04:00
|
|
|
end
|