Exemplo n.º 1
0
        public static int Main(String [] Args)
        {
            int iRep = 0;
            int iObj = 0;

            Console.WriteLine("Test should return with ExitCode 100 ...");

            switch (Args.Length)
            {
            case 1:
                Int32.TryParse(Args[0], out iRep);
                goto default;

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

            default:
                if (iRep == 0)
                {
                    iRep = 10;
                }
                if (iObj == 0)
                {
                    iObj = 40000;
                }
                break;
            }

            Console.Write("iRep= ");
            Console.Write(iRep);
            Console.Write(" ; iObj= ");
            Console.WriteLine(iObj);

            GCVariant2 Mv_Obj = new GCVariant2();

            if (Mv_Obj.runTest(iRep, iObj))
            {
                Console.WriteLine("Test Passed");
                return(100);
            }

            Console.WriteLine("Test Failed");
            return(1);
        }
Exemplo n.º 2
0
        public static int Main(String [] Args)
        {
            int iRep = 0;
            int iObj = 0;
            Console.WriteLine("Test should return with ExitCode 100 ...");

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

            Console.Write("iRep= ");
            Console.Write(iRep);
            Console.Write(" ; iObj= ");
            Console.WriteLine(iObj);

            GCVariant2 Mv_Obj = new GCVariant2();
            if(Mv_Obj.runTest(iRep, iObj ))
            {
                Console.WriteLine("Test Passed");
                return 100;
            }

            Console.WriteLine("Test Failed");
            return 1;
        }