示例#1
0
        public static int Main(System.String [] Args)
        {
            int iRep = 2;
            int iObj = 15; //the number of MB memory will be allocted in MakeLeak()

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

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

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

            default:
                iRep = 2;
                iObj = 15;
                break;
            }

            LeakGenThrd Mv_Leak = new LeakGenThrd();

            if (Mv_Leak.runTest(iRep, iObj))
            {
                Console.WriteLine("Test Passed");
                return(100);
            }
            else
            {
                Console.WriteLine("Test Failed");
                return(1);
            }
        }
示例#2
0
        public static int Main(System.String[] Args)
        {
            int iRep = 2;
            int iObj = 15; //the number of MB memory will be allocted in MakeLeak()

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

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

            default:
                iRep = 2;
                iObj = 15;
                break;
            }

            LeakGenThrd Mv_Leak = new LeakGenThrd();

            if (Mv_Leak.runTest(iRep, iObj))
            {
                Console.WriteLine("Test Passed");
                return(100);
            }
            else
            {
                Console.WriteLine("Test Failed");
                return(1);
            }
        }
示例#3
0
        public static int Main(System.String [] Args)
        {
            int iRep = 2;
            int iObj = 15; //the number of MB memory will be allocted in MakeLeak()

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

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

            LeakGenThrd Mv_Leak = new LeakGenThrd();
            if(Mv_Leak.runTest(iRep, iObj ))
            {
                Console.WriteLine("Test Passed");
                return 100;
            }
            else
            {
                Console.WriteLine("Test Failed");
                return 1;
            }
        }
示例#4
0
        public static int Main(System.String[] Args)
        {
            int iRep = 2;
            int iObj = 15; //the number of MB memory will be allocted in MakeLeak()

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

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