private void EnqueTestProgram_Return999WhenNegative() { loader.StartAt(050); loader.EnqueueSubRoutine( 560, 900 ); loader.StartAt(060); loader.EnqueueSubRoutine( ResultWhen_Negative, ResultWhen_Positive ); loader.StartAt(003); loader.EnqueueProgram( 020, 120, 350, 561, 900 ); }
public void ProgramNo4_RocketLaunchingCountdown() { loader.StartAt(019); loader.EnqueueSubRoutine( -004 ); loader.StartAt(020); loader.EnqueueProgram( 119, 200, 618, 518, 321, 900 ); computer.Execute(); Assert.AreEqual(4, computer.Output.Count); Assert.AreEqual(-003, computer.Output.Dequeue()); Assert.AreEqual(-002, computer.Output.Dequeue()); Assert.AreEqual(-001, computer.Output.Dequeue()); Assert.AreEqual(000, computer.Output.Dequeue()); }