IronRuby.Tests.Driver.Run C# (CSharp) Метод

Run() публичный статический Метод

public static Run ( List args, string baseDirectory ) : int
args List
baseDirectory string
Результат int
        public static int Run(List<string>/*!*/ args, string/*!*/ baseDirectory) {
            if (Thread.CurrentThread.CurrentCulture.ToString() != "en-US") {
                Console.WriteLine("Current culture: {0}", Thread.CurrentThread.CurrentCulture);
            }

            if (!ParseArguments(args)) {
                return -3;
            }

            int status = 0;

            if (_runTokenizerDriver) {
                TokenizerTestDriver driver = new TokenizerTestDriver((RubyContext)HostingHelpers.GetLanguageContext(Ruby.CreateEngine()));
                if (!driver.ParseArgs(args)) {
                    return -3;
                }

                status = driver.RunTests();
            } else {
                InitializeDomain();
                Driver driver = new Driver(baseDirectory);
                
                if (Manual.TestCode.Trim().Length == 0) {
                    status = driver.RunUnitTests(args);
                } else {
                    driver.RunManualTest();

                    // for case the test is forgotten, this would fail the test suite:
                    status = -2;
                }
            }

            // return failure on bad filter (any real failures throw)
            return status;
        }

Usage Example

Пример #1
0
 public void Run()
 {
     ExitCode = Driver.Run(Args);
 }
All Usage Examples Of IronRuby.Tests.Driver::Run