def test_rel_base_offset_1(self): # arrange program = [109,1,204,-1,1001,100,1,100,1008,100,16,101,1006,101,0,99] results = [] c = Compute(program) # act c.LoadInput([]) c.RunCompute() results=c.GetOutputs() # assert self.assertEqual(results, program)
def test_paint_program(self): # arrange infile = open('data/input_11.txt','r') program = infile.readline().strip().split(',') c = Compute(program) result = [] # act c.LoadInput([0]) c.LoadProgram(program) result = c.RunFor2Outputs() output = c.GetOutputs() # assert self.assertEqual(result, (1,0))