Exemple #1
0
        public static int Main(System.String [] Args)
        {
            int iRep = 0;
            int iObj = 0; //the number of Mb will be allocated in MakeLeak();

            Console.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 = 10;
                }
                break;

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

            LeakGen Mv_Leak = new LeakGen();

            if (Mv_Leak.runTest(iRep, iObj))
            {
                Console.WriteLine("Test Passed");
                return(100);
            }
            else
            {
                Console.WriteLine("Test Failed");
                return(1);
            }
        }
Exemple #2
0
        public static int Main(System.String [] Args)
        {
            int iRep = 0;
            int iObj = 0; //the number of Mb will be allocated in MakeLeak();
           
            Console.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 = 10;
                    }
                break;
                default:
                    iRep = 2;
                    iObj = 10;
                break;
            }

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