internal static void ColorWrite(ConsoleColor color, string/*!*/ str, params object[] args) { var oldColor = Console.ForegroundColor; Console.ForegroundColor = color; Console.WriteLine(str, args); Console.ForegroundColor = oldColor; }
private void XAssertOutput(Action f, string expectedOutput, OutputFlags flags) { Driver.ColorWrite(ConsoleColor.Yellow, "Assertion check skipped."); // just run the code f(); }