public void SampleOneTest() { var opcodes = "1,0,0,0,99"; var output = 2; var intCode = new IntCode(opcodes); intCode.Start(); Assert.AreEqual(2, intCode.GetValue(0)); }
public void PartTwoAnswerTest() { var opcodes = new StreamReader("/Users/henny/dev/Advent.Of.Code.2019/AdventOfCode.2019.DayTwo/input.txt") .ReadToEnd(); var output = 2894520; var intCode = new IntCode(opcodes); intCode.Relocate(1, 12); intCode.Relocate(2, 2); intCode.Start(); Assert.AreEqual(output, intCode.GetValue(0)); }