예제 #1
0
파일: Program.cs 프로젝트: radtek/ReoScript
        static int Main(string[] args)
        {
            List <string> ids         = new List <string>();
            List <string> enabledTags = new List <string>();

            foreach (string a in args)
            {
                if (a.StartsWith("-et"))
                {
                    enabledTags.Add(a.Substring(3, a.Length - 3).ToLower());
                }
                else
                {
                    ids.Add(args[0]);
                }
            }

            TestCaseRunner runner = new TestCaseRunner();

            bool hasErrors = runner.RunLanguageTests(ids, enabledTags);

            hasErrors |= runner.RunCLRTests();

            //using (ReoScriptEditor editor = new ReoScriptEditor())
            //{
            //  using (StreamReader sr = new StreamReader(new FileStream("scripts/winform.rs", FileMode.Open)))
            //  {
            //    editor.Srm.WorkMode |= MachineWorkMode.AllowDirectAccess
            //      | MachineWorkMode.AllowImportTypeInScript | MachineWorkMode.AllowCLREventBind;

            //    editor.Script = sr.ReadToEnd();
            //  }

            //  Application.Run(editor);
            //}

            Console.WriteLine("Total result: \n");
            Console.WriteLine("    {0,3} test cases, {1,3} successed, {2,3} failed, {3,3} skipped",
                              runner.TotalCases, runner.TotalSuccesses, runner.TotalFailures,
                              (runner.TotalCases - runner.TotalSuccesses - runner.TotalFailures));
            Console.WriteLine("  {0,5} objects created.\n", runner.TotalObjectCreates);

            return(hasErrors ? 1 : 0);
        }
예제 #2
0
        static int Main(string[] args)
        {
            List<string> ids = new List<string>();
            List<string> enabledTags = new List<string>();

            foreach (string a in args)
            {
                if (a.StartsWith("-et"))
                {
                    enabledTags.Add(a.Substring(3, a.Length - 3).ToLower());
                }
                else
                {
                    ids.Add(args[0]);
                }
            }

            TestCaseRunner runner = new TestCaseRunner();

            bool hasErrors = runner.RunLanguageTests(ids, enabledTags);
            hasErrors |= runner.RunCLRTests();

            //using (ReoScriptEditor editor = new ReoScriptEditor())
            //{
            //  using (StreamReader sr = new StreamReader(new FileStream("scripts/winform.rs", FileMode.Open)))
            //  {
            //    editor.Srm.WorkMode |= MachineWorkMode.AllowDirectAccess
            //      | MachineWorkMode.AllowImportTypeInScript | MachineWorkMode.AllowCLREventBind;

            //    editor.Script = sr.ReadToEnd();
            //  }

            //  Application.Run(editor);
            //}

            Console.WriteLine("Total result: \n");
            Console.WriteLine("    {0,3} test cases, {1,3} successed, {2,3} failed, {3,3} skipped",
                runner.TotalCases, runner.TotalSuccesses, runner.TotalFailures,
                (runner.TotalCases - runner.TotalSuccesses - runner.TotalFailures));
            Console.WriteLine("  {0,5} objects created.\n", runner.TotalObjectCreates);

            return hasErrors ? 1 : 0;
        }