Implement 2019 day 5 part 1

This commit is contained in:
2021-01-23 19:57:36 +01:00
parent ad3029759a
commit b18945c44d
3 changed files with 86 additions and 12 deletions

View File

@@ -10,7 +10,9 @@ from aoc2019.intcode import Computer
([1, 0, 0, 0, 99], [2, 0, 0, 0, 99]),
([2, 3, 0, 3, 99], [2, 3, 0, 6, 99]),
([2, 4, 4, 5, 99, 0], [2, 4, 4, 5, 99, 9801]),
([1, 1, 1, 4, 99, 5, 6, 0, 99], [30, 1, 1, 4, 2, 5, 6, 0, 99])
([1, 1, 1, 4, 99, 5, 6, 0, 99], [30, 1, 1, 4, 2, 5, 6, 0, 99]),
# This is technically part of day 5 but it fits the pattern
([1002, 4, 3, 4, 33], [1002, 4, 3, 4, 99])
])
def test_instructions_day2(program: List[int], expected: List[int]) -> None:
computer = Computer(program)