Exemplo n.º 1
0
 /// <summary>
 /// Runs the currently loaded program.
 /// </summary>
 /// <returns>RuntimeException object representing the cause of the program termination.</returns>
 public RuntimeException Run()
 {
     while (true)
     {
         try
         {
             Processor.Step();
         }
         catch (RuntimeException e)
         {
             if (e is NormalTerminationRuntimeException)
             {
                 var testingIO = Processor.IODevice as TestingIODevice;
                 if (testingIO != null)
                 {
                     if (!testingIO.IsOutputOk())
                     {
                         return(new ExpectedOutputMismatchRuntimeException());
                     }
                 }
             }
             return(e);
         }
         Data.Commit();
     }
 }
Exemplo n.º 2
0
 /// <summary>
 /// Runs the currently loaded program.
 /// </summary>
 /// <returns>RuntimeException object representing the cause of the program termination.</returns>
 public RuntimeException Run()
 {
     while (true)
     {
         try
         {
             Processor.Step();
         }
         catch (RuntimeException e)
         {
             return(e);
         }
         Data.Commit();
     }
 }