Files
advent_of_code/test/year_2025/dial_test.exs
2025-12-13 15:44:10 -05:00

26 lines
534 B
Elixir

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