feat: ugh...this shouldn't be that hard

This commit is contained in:
Stevan Freeborn
2025-12-02 07:18:38 -06:00
parent e7c180de4b
commit d61a630607
5 changed files with 111 additions and 4 deletions
+19
View File
@@ -16,6 +16,25 @@ func TestNew(t *testing.T) {
}
}
func TestProblem(t *testing.T) {
instructions := []instruction.Instruction{
instruction.FromLine("R48"),
instruction.FromLine("L5"),
}
dial := dial.From(52)
for _, i := range instructions {
dial.Turn(i)
}
result := dial.ZeroCount()
if result != 1 {
t.Errorf("ya done fucked up. you wanted %d but got %d", 1, result)
}
}
type TurnTestCase struct {
Instruction instruction.Instruction
ExpectedDialValue int