Main() public static method

public static Main ( String args ) : int
args String
return int
Ejemplo n.º 1
0
        static void RunTests()
        {
            TestRunner.MainLoop = new NSRunLoopIntegration();
            List <string> args = new List <string> ()
            {
                typeof(MainClass).Assembly.Location, "-labels", "-noheader"
            };

            string testName = System.Environment.GetEnvironmentVariable("XM_TEST_NAME");

            if (testName != null)
            {
                args.Add($"-test={testName}");
            }

#if ADD_BCL_EXCLUSIONS
            args.Add("-exclude=MacNotWorking,MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter");
#endif

            TestRunner.Main(args.ToArray());

#if NO_GUI_TESTING
            // HACK - TestRunner.Main assumes you have a message pump spinning, but when I hack it out via NO_GUI_TESTING it returns right away
            // We will exit via Environment.Exit in NSRunLoopIntegration
            while (true)
            {
                System.Threading.Thread.Sleep(1000);
            }
#endif
        }
Ejemplo n.º 2
0
 static void RunTests()
 {
     TestRunner.MainLoop = new NSRunLoopIntegration();
     TestRunner.Main(new[] {
         typeof(MainClass).Assembly.Location,
         "-labels",
         "-noheader"
     });
 }
        static void RunTests()
        {
            TestRunner.MainLoop = new NSRunLoopIntegration();
            List <string> args = new List <string>()
            {
                typeof(MainClass).Assembly.Location, "-labels", "-noheader", "-result=TEST-Mac.xml"
            };


            TestRunner.Main(args.ToArray());
        }
Ejemplo n.º 4
0
        static void RunTests()
        {
            TestRunner.MainLoop = new NSRunLoopIntegration();
            string testName = System.Environment.GetEnvironmentVariable("XM_TEST_NAME");

            string [] args = testName != null ?
                             new [] { typeof(MainClass).Assembly.Location, "-labels", "-noheader", string.Format("-test={0}", testName) } :
            new [] { typeof(MainClass).Assembly.Location, "-labels", "-noheader" };

            TestRunner.Main(args);
        }
Ejemplo n.º 5
0
        static void RunTests(string [] original_args)
        {
            TestRunner.MainLoop = new NSRunLoopIntegration();
            List <string> args = new List <string> ()
            {
                typeof(MainClass).Assembly.Location, "-labels", "-noheader"
            };

            string testName = System.Environment.GetEnvironmentVariable("XM_TEST_NAME");

            if (testName != null)
            {
                args.Add($"-test={testName}");
            }

#if ADD_BCL_EXCLUSIONS
            args.Add("-exclude=MacNotWorking,MobileNotWorking,NotOnMac,NotWorking,ValueAdd,CAS,InetAccess,NotWorkingInterpreter");
#endif

            // Skip arguments added by VSfM/macOS when running from the IDE
            foreach (var arg in original_args)
            {
                if (!arg.StartsWith("-psn_", StringComparison.Ordinal))
                {
                    args.Add(arg);
                }
            }

            TestRunner.Main(args.ToArray());

#if NO_GUI_TESTING
            // HACK - TestRunner.Main assumes you have a message pump spinning, but when I hack it out via NO_GUI_TESTING it returns right away
            // We will exit via Environment.Exit in NSRunLoopIntegration
            while (true)
            {
                System.Threading.Thread.Sleep(1000);
            }
#endif
        }