private runTest ( double timeInterval, int repetitions ) : Boolean | ||
timeInterval | double | |
repetitions | int | |
return | Boolean |
public static void Main(String[] args) { Boolean bResult = false; Co2345Replace_cc oReplaceTest = new Co2345Replace_cc(); Console.WriteLine(" Starting " + strName + " ..."); Console.WriteLine("USAGE: Co2346Replace_ss.exe Time_in_Seconds_per_rep Number_of_repetitions"); Console.WriteLine("USAGE: Defaults args are: 2 2 (must give both args if give any)"); Console.WriteLine(); double timeInSecs = 2.0; int numOfReps = 2; try { if (args.Length >= 1) { timeInSecs = Convert.ToInt64(args[0]); } if (args.Length >= 2) { numOfReps = Convert.ToInt32(args[1]); } } catch (System.FormatException) { Console.WriteLine("INVALID ARGUMENTS"); Console.WriteLine("USING DEFAULT: Co2345Replace_cc.exe 2 2 "); timeInSecs = 2.0; numOfReps = 2; } catch (Exception exc) { Console.WriteLine("Error_abc637: Conversion error about input args?"); Console.WriteLine(exc.ToString()); goto LABEL_842_RETURN_LABEL; } try { Console.WriteLine("RUNNING: Co2345Replace_cc.exe " + timeInSecs + " " + numOfReps); bResult = oReplaceTest.runTest(timeInSecs, numOfReps); } catch (Exception exc_main) { bResult = false; String strInfo = "Unexpected Exception: (runTest)"; strInfo = strInfo + exc_main.ToString(); Console.Error.WriteLine(strName + " " + strTest + " " + strPath); Console.Error.WriteLine(strInfo); } LABEL_842_RETURN_LABEL :; if (!bResult) { Console.Error.WriteLine("PATHTOSOURCE: " + strPath + strTest + " FAIL"); } if (bResult == true) { Environment.ExitCode = 0; } else { Environment.ExitCode = 11; } }
public static void Main( String[] args ) { Boolean bResult = false; Co2345Replace_cc oReplaceTest = new Co2345Replace_cc(); Console.WriteLine( " Starting "+ strName +" ..." ); Console.WriteLine( "USAGE: Co2346Replace_ss.exe Time_in_Seconds_per_rep Number_of_repetitions" ); Console.WriteLine( "USAGE: Defaults args are: 2 2 (must give both args if give any)" ); Console.WriteLine(); double timeInSecs=2.0; int numOfReps=2; try { if (args.Length>=1) timeInSecs=Convert.ToInt64(args[0]); if (args.Length>=2) numOfReps = Convert.ToInt32(args[1]); } catch (System.FormatException) { Console.WriteLine ("INVALID ARGUMENTS"); Console.WriteLine ("USING DEFAULT: Co2345Replace_cc.exe 2 2 "); timeInSecs=2.0; numOfReps=2; } catch ( Exception exc ) { Console.WriteLine( "Error_abc637: Conversion error about input args?" ); Console.WriteLine( exc.ToString() ); goto LABEL_842_RETURN_LABEL; } try { Console.WriteLine( "RUNNING: Co2345Replace_cc.exe "+ timeInSecs+" "+ numOfReps); bResult = oReplaceTest.runTest(timeInSecs, numOfReps); } catch ( Exception exc_main ) { bResult = false; String strInfo = "Unexpected Exception: (runTest)" ; strInfo = strInfo + exc_main.ToString() ; Console.Error.WriteLine (strName+" "+strTest+" "+strPath); Console.Error.WriteLine (strInfo); } LABEL_842_RETURN_LABEL:; if ( ! bResult ) Console.Error.WriteLine( "PATHTOSOURCE: " + strPath + strTest + " FAIL" ); if ( bResult == true ) Environment.ExitCode = 0; else Environment.ExitCode = 11; }