Mixifying

This commit is contained in:
2025-12-13 15:42:22 -05:00
parent dbe0615d0e
commit d34cf3575c
10 changed files with 138 additions and 15 deletions

1
test/test_helper.exs Normal file
View File

@@ -0,0 +1 @@
ExUnit.start()

View 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