Пример #1
0
        public static int Main(System.String [] Args)
        {
            DLBigLeakThd Mv_Leak = new DLBigLeakThd();

            int iRep = 0;
            int iObj = 0;
            int iThd = 0;
            Console.Out.WriteLine("Test should return with ExitCode 100 ...");
            //Console.SetOut(TextWriter.Synchronized(Console.Out));

            switch( Args.Length )
            {
                case 1:
                    if (!Int32.TryParse( Args[0], out iRep ))
                    {
                        iRep = 1;
                    }
                break;

                case 2:
                    if (!Int32.TryParse( Args[0], out iRep ))
                    {
                        iRep = 1;
                    }
                    if (!Int32.TryParse( Args[1], out iObj ))
                    {
                        iObj = 20;
                    }
                break;

                case 3:
                    if (!Int32.TryParse( Args[0], out iRep ))
                    {
                        iRep = 1;
                    }
                    if (!Int32.TryParse( Args[1], out iObj ))
                    {
                        iObj = 20;
                    }
                    if (!Int32.TryParse( Args[2], out iThd ))
                    {
                        iThd = 2;
                    }
                break;

                default:
                    iRep = 1;
                    iObj = 20;
                    iThd = 2;
                break;
            }

            if (Mv_Leak.runTest(iRep, iObj, iThd ))
            {
                Console.WriteLine("Test Passed");
                return 100;
            }
            Console.WriteLine("Test Failed");
            return 1;

        }
Пример #2
0
        public static int Main(System.String [] Args)
        {
            DLBigLeakThd Mv_Leak = new DLBigLeakThd();

            int iRep = 0;
            int iObj = 0;
            int iThd = 0;

            Console.Out.WriteLine("Test should return with ExitCode 100 ...");
            //Console.SetOut(TextWriter.Synchronized(Console.Out));

            switch (Args.Length)
            {
            case 1:
                if (!Int32.TryParse(Args[0], out iRep))
                {
                    iRep = 1;
                }
                break;

            case 2:
                if (!Int32.TryParse(Args[0], out iRep))
                {
                    iRep = 1;
                }
                if (!Int32.TryParse(Args[1], out iObj))
                {
                    iObj = 20;
                }
                break;

            case 3:
                if (!Int32.TryParse(Args[0], out iRep))
                {
                    iRep = 1;
                }
                if (!Int32.TryParse(Args[1], out iObj))
                {
                    iObj = 20;
                }
                if (!Int32.TryParse(Args[2], out iThd))
                {
                    iThd = 2;
                }
                break;

            default:
                iRep = 1;
                iObj = 20;
                iThd = 2;
                break;
            }

            if (Mv_Leak.runTest(iRep, iObj, iThd))
            {
                Console.WriteLine("Test Passed");
                return(100);
            }
            Console.WriteLine("Test Failed");
            return(1);
        }