public TestRun(TestDescription
description,
RunningMode
runningMode)
        {
            this.description
            =
            description;
            Process
            p
            =
            new
            Process
            ();
            p.StartInfo.UseShellExecute
            =
            false;
            p.StartInfo.CreateNoWindow
            =
            true;
            p.StartInfo.RedirectStandardOutput
            =
            true;
            p.EnableRaisingEvents
            =
            true;
            string
            program
            =
            "unhandled-exception-test-case";
            if
            (description.RCIL)
            {
            program
            =
            program
            +
            "-legacy";
            }
            program
            =
            program
            +
            (description.USE20
            ?
            ".2.exe"
            :
            ".1.exe");
            if
            (runningMode.UseMonoRuntime)
            {
            p.StartInfo.FileName
            =
            runningMode.RUNTIME;
            p.StartInfo.Arguments
            =
            "--debug "
            +
            program
            +
            " "
            +
            description.Arguments;
            }
            else
            {
            p.StartInfo.FileName
            =
            program;
            p.StartInfo.Arguments
            =
            description.Arguments;
            }
            Console.WriteLine
            ("Starting process \"{0}\" \"{1}\"",
            p.StartInfo.FileName,
            p.StartInfo.Arguments);
            p.Start();
            string
            output
            =
            p.StandardOutput.ReadToEnd
            ();
            p.WaitForExit
            ();
            string[]
            outputLines
            =
            output.Split
            ('\n');
            result
            =
            new
            TestResult
            (p.ExitCode,
            outputLines);
        }
        public bool Process(RunningMode
runningMode)
        {
            if
            (runningMode.GTC)
            {
            Console.WriteLine
            ("Generating test configuration...");
            Print
            ();
            return
            true;
            }
            else
            {
            Console.WriteLine
            ("Checking test result...");
            bool
            checkResult
            =
            Check
            ();
            if
            (!
            checkResult)
            {
            Print
            ();
            }
            else
            {
            Console.WriteLine
            ("Test PASSED");
            }
            return
            checkResult;
            }
        }