Example #1
0
        public static int Main(String [] Args)
        {
            int iRep     = 0;
            int iObj     = 0;
            int iBigSize = 0;
            int iSeed    = 0;

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

            if (Args.Length == 4)
            {
                if (!Int32.TryParse(Args[0], out iRep) ||
                    !Int32.TryParse(Args[1], out iObj) ||
                    !Int32.TryParse(Args[2], out iBigSize) ||
                    !Int32.TryParse(Args[3], out iSeed))
                {
                    return(1);
                }
            }
            else
            {
                iRep     = 10;
                iObj     = 100;
                iBigSize = 2;
                iSeed    = 49;
            }

            if (iObj <= 10)
            {
                Console.WriteLine("the second argument must be larger than 10.");
                return(1);
            }

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

            RanCollect Mv_Obj = new RanCollect();

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

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

            if (Args.Length == 4)
            {
                if (!Int32.TryParse( Args[0], out iRep) ||
                    !Int32.TryParse( Args[1], out iObj) ||
                    !Int32.TryParse( Args[2], out iBigSize ) ||
                    !Int32.TryParse( Args[3], out iSeed ) )
                    {
                        return 1;
                    }
            }
            else
            {
                iRep = 10;
                iObj = 100;
                iBigSize = 2;
                iSeed = 49;
            }

            if(iObj <= 10)
            {
                Console.WriteLine("the second argument must be larger than 10.");
                return 1;
            }

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

            RanCollect Mv_Obj = new RanCollect();

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

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