Mixifying
This commit is contained in:
1
test/test_helper.exs
Normal file
1
test/test_helper.exs
Normal file
@@ -0,0 +1 @@
|
||||
ExUnit.start()
|
||||
25
test/year_2025/dial_test.exs
Normal file
25
test/year_2025/dial_test.exs
Normal file
@@ -0,0 +1,25 @@
|
||||
defmodule AdventOfCode.Year2025.DialTest do
|
||||
use ExUnit.Case, async: true
|
||||
|
||||
import AdventOfCode.Year2025.Dial
|
||||
|
||||
test "dial starts at 50" do
|
||||
{ index, _ } = rotate([])
|
||||
assert index == 50
|
||||
end
|
||||
|
||||
test "rotate right increments index" do
|
||||
{index, _} = rotate(["R1"])
|
||||
assert index == 51
|
||||
end
|
||||
|
||||
test "rotate left decrements index" do
|
||||
{index, _} = rotate(["L1"])
|
||||
assert index ==49
|
||||
end
|
||||
|
||||
test "increments zero crossings when landing on zero" do
|
||||
{_, zeroes} = rotate(["R50"])
|
||||
assert zeroes == 1
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user