CClash.Tests.CompilerCacheTest.RunEnabledDirectNotSupported C# (CSharp) Метод

RunEnabledDirectNotSupported() приватный Метод

private RunEnabledDirectNotSupported ( int times ) : void
times int
Результат void
        public void RunEnabledDirectNotSupported(int times)
        {
            Assert.IsFalse(Settings.Disabled);
            Assert.IsTrue(Settings.DirectMode);
            var comp = CompilerTest.CompilerPath;
            Environment.SetEnvironmentVariable("PATH", System.IO.Path.GetDirectoryName(comp) + ";" + Environment.GetEnvironmentVariable("PATH"));
            for (int i = 0; i < times; i++)
            {
                var args = new string[] { "/E", "/nologo", "/c", @"test-sources\hello.c", "/Itest-sources\\inc with spaces" };
                var realerr = new StringBuilder();
                var realout = new StringBuilder();
                RunSubprocess(Compiler.Find(), args, realout, realerr);
                var experr = realerr.ToString();
                var expout = realout.ToString();

                Program.MainStdErr.Clear();
                Program.MainStdOut.Clear();
                
                var rv = Program.Main(args);
                
                var stderr = Program.MainStdErr.ToString();
                var stdout = Program.MainStdOut.ToString();

                Assert.AreEqual(experr, stderr);
                Assert.AreEqual(expout, stdout);

                Assert.AreEqual(0, rv);
            }
        }