public static int Main(String[] Args) { int iRep = 0; int iObj = 0; int iNum = 0; Console.WriteLine("Test should return with ExitCode 100 ..."); switch (Args.Length) { case 1: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } iObj = 100; iNum = 10; break; case 2: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } if (!Int32.TryParse(Args[1], out iObj)) { iObj = 100; } iNum = 10; break; case 3: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } if (!Int32.TryParse(Args[1], out iObj)) { iObj = 100; } if (!Int32.TryParse(Args[2], out iNum)) { iNum = 10; } break; default: iRep = 5; iObj = 100; iNum = 10; break; } Console.Write("iRep= "); Console.Write(iRep); Console.Write(" iObj= "); Console.Write(iObj); Console.Write(" iNum= "); Console.WriteLine(iNum); GCVariant Mv_Obj = new GCVariant(); if (Mv_Obj.runTest(iRep, iObj, iNum)) { Console.WriteLine("Test Passed"); return(100); } Console.WriteLine("Test Failed"); return(1); }
public static int Main(String[] Args) { int iRep = 0; int iObj = 0; int iNum = 0; Console.WriteLine("Test should return with ExitCode 100 ..."); switch (Args.Length) { case 1: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } iObj = 100; iNum = 10; break; case 2: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } if (!Int32.TryParse(Args[1], out iObj)) { iObj = 100; } iNum = 10; break; case 3: if (!Int32.TryParse(Args[0], out iRep)) { iRep = 5; } if (!Int32.TryParse(Args[1], out iObj)) { iObj = 100; } if (!Int32.TryParse(Args[2], out iNum)) { iNum = 10; } break; default: iRep = 5; iObj = 100; iNum = 10; break; } Console.Write("iRep= "); Console.Write(iRep); Console.Write(" iObj= "); Console.Write(iObj); Console.Write(" iNum= "); Console.WriteLine(iNum); GCVariant Mv_Obj = new GCVariant(); if (Mv_Obj.runTest(iRep, iObj, iNum)) { Console.WriteLine("Test Passed"); return 100; } Console.WriteLine("Test Failed"); return 1; }