Beispiel #1
0
 def test_cmd99(self):
     code = Intcode([1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50], 9, 10)
     code.pointer = 8
     code.cmd99()
     assert code.program == [1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50]
     assert code.pointer == 8
     assert code.terminated
Beispiel #2
0
 def test_cmd99(self):
     code = Intcode([1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50], 9, 10)
     code.pointer = 8
     code.cmd99()
     assert code.program == defaultdict(
         int, enumerate([1, 9, 10, 3, 2, 3, 11, 0, 99, 30, 40, 50]))
     assert code.pointer == 8
     assert code.terminated