1
0
Fork 0

chore: generate day 1 modules

This commit is contained in:
Sloane Perrault 2022-09-21 09:19:53 -04:00
parent 07b2552249
commit b4c93e39f4
4 changed files with 62 additions and 1 deletions

View file

@ -14,7 +14,7 @@
| S | M | T | W | T | F | S | | S | M | T | W | T | F | S |
| :-: | :-: | :-: | :-: | :-: | :-: | :-: | | :-: | :-: | :-: | :-: | :-: | :-: | :-: |
| | | | 1 | 2 | 3 | 4 | | | | | [1] | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 | | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 | | 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 | | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
@ -38,3 +38,5 @@ A behaviour for a solution to a puzzle. Must define a `solve/2` callback.
Case template defining an `assert_solution/2` helper. Case template defining an `assert_solution/2` helper.
<!-- links --> <!-- links -->
[1]: ./lib/advent_of_code/day01.ex

View file

@ -0,0 +1,37 @@
defmodule AdventOfCode.Day01 do
@moduledoc """
Day 1
"""
end
defmodule AdventOfCode.Day01.Part1 do
@moduledoc """
Day 1, Part 1
"""
alias AdventOfCode.PuzzleSolver
use PuzzleSolver
import AdventOfCode.Day01, warn: false
@impl PuzzleSolver
def solve(_input_stream) do
:ok |> to_string()
end
end
defmodule AdventOfCode.Day01.Part2 do
@moduledoc """
Day 1, Part 2
"""
alias AdventOfCode.PuzzleSolver
use PuzzleSolver
import AdventOfCode.Day01, warn: false
@impl PuzzleSolver
def solve(_input_stream) do
:ok |> to_string()
end
end

View file

@ -0,0 +1,11 @@
defmodule AdventOfCode.Day01.Part1Test do
use AdventOfCode.PuzzleCase, module: AdventOfCode.Day01.Part1
test "returns :ok" do
input = ~S"""
input
"""
assert_solution(input, "ok")
end
end

View file

@ -0,0 +1,11 @@
defmodule AdventOfCode.Day01.Part2Test do
use AdventOfCode.PuzzleCase, module: AdventOfCode.Day01.Part2
test "returns :ok" do
input = ~S"""
input
"""
assert_solution(input, "ok")
end
end