private static string RunAndCollectOutput(ZMachine zm, TestCaseIO io) { string output = null; try { zm.PredictableRandom = true; zm.Run(); output = io.CollectOutput(); } catch (Exception ex) { if (output == null) { output = io.CollectOutput(); } output += "\n\n*** Exception ***\n" + ex.ToString(); } return(output); }
private static string RunAndCollectOutput(ZMachine zm, TestCaseIO io) { string output = null; try { zm.PredictableRandom = true; zm.Run(); output = io.CollectOutput(); } catch (Exception ex) { if (output == null) output = io.CollectOutput(); output += "\n\n*** Exception ***\n" + ex.ToString(); } return output; }