Exemplo n.º 1
0
 def test_jump_if_true_with_false(self, mock_get_param):
     expected = 3
     mock_get_param.side_effect = [0, 99]
     memory = []
     modes = []
     computer = IntComputer(memory)
     computer.jump_if_true(modes)
     assert computer.pointer == expected
Exemplo n.º 2
0
 def test_jump_if_true(self, mock_get_param):
     expected = 99
     mock_get_param.side_effect = [1, expected]
     memory = []
     modes = []
     computer = IntComputer(memory)
     computer.jump_if_true(modes)
     assert computer.pointer == expected