public Boolean runTest() { int iCountErrors = 0; int iCountTestcases = 0; String strLoc = "123_er"; Console.Out.Write(s_strClassMethod); Console.Out.Write(": "); Console.Out.Write(s_strTFPath + s_strTFName); Console.Out.Write(": "); Console.Out.Write(s_strDtTmVer); Console.Out.WriteLine(" runTest started..."); ValueType vt1; MyStruct1 mystr1; MyStruct1 mystr11; MyStruct2 mystr2; MyStruct2 mystr22; MyStruct3 mystr3; MyStruct3 mystr33; MyStruct4 mystr4; MyStruct4 mystr44; MyStruct5 mystr5; MyStruct5 mystr55; MyStruct6 mystr6; MyStruct6 mystr66; MyStruct7 mystr7; MyStruct7 mystr77; Color enumCol1; Color enumCol2; object objValue1; object objValue2; try { mystr1 = new MyStruct1(5); mystr11 = mystr1; iCountTestcases++; if (!mystr1.Equals(mystr11)) { iCountErrors++; Console.WriteLine("Err_53vd! ValueType change detected, please take a look"); } vt1 = mystr1; iCountTestcases++; if (!vt1.Equals(mystr1)) { iCountErrors++; Console.WriteLine("Err_8536cd! ValueType change detected, please take a look"); } objValue1 = mystr1; iCountTestcases++; if (!objValue1.Equals(mystr1)) { iCountErrors++; Console.WriteLine("Err_7563fdg! ValueType change detected, please take a look"); } mystr1 = new MyStruct1(5); mystr11 = new MyStruct1(5); iCountTestcases++; if (!mystr1.Equals(mystr11)) { iCountErrors++; Console.WriteLine("Err_175td! ValueType change detected, please take a look"); } mystr1 = new MyStruct1(5); mystr2 = new MyStruct2(5); iCountTestcases++; if (mystr1.Equals(mystr2)) { iCountErrors++; Console.WriteLine("Err_62c8sb! ValueType change detected, please take a look"); } mystr2 = new MyStruct2(5); mystr22 = new MyStruct2(5); iCountTestcases++; if (!mystr2.Equals(mystr22)) { iCountErrors++; Console.WriteLine("Err_753cs! ValueType change detected, please take a look"); } mystr2 = new MyStruct2(5); mystr22 = new MyStruct2(5); vt1 = mystr22; iCountTestcases++; if (!mystr2.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_653cds! ValueType change detected, please take a look"); } mystr3 = new MyStruct3(); mystr33 = new MyStruct3(); iCountTestcases++; if (!mystr3.Equals(mystr33)) { iCountErrors++; Console.WriteLine("Err_105ds! ValueType change detected, please take a look"); } vt1 = mystr33; iCountTestcases++; if (!mystr3.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_01435xs! ValueType change detected, please take a look"); } mystr4 = new MyStruct4(5); mystr44 = new MyStruct4(15); iCountTestcases++; if (!mystr4.Equals(mystr44)) { iCountErrors++; Console.WriteLine("Err_642cd! ValueType change detected, please take a look"); } mystr44 = new MyStruct4(20); vt1 = mystr44; iCountTestcases++; if (!mystr4.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_5420csd! ValueType change detected, please take a look"); } mystr5 = new MyStruct5(5); mystr55 = new MyStruct5(5); iCountTestcases++; if (!mystr5.Equals(mystr55)) { iCountErrors++; Console.WriteLine("Err_519amg! ValueType change detected, please take a look"); } vt1 = mystr55; iCountTestcases++; if (!mystr5.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_17cdx ValueType change detected, please take a look"); } mystr5 = new MyStruct5(5); mystr55 = new MyStruct5(15); iCountTestcases++; if (mystr5.Equals(mystr55)) { iCountErrors++; Console.WriteLine("Err_105xcs! ValueType change detected, please take a look"); } mystr6 = new MyStruct6(); mystr66 = new MyStruct6(); iCountTestcases++; if (!mystr6.Equals(mystr66)) { iCountErrors++; Console.WriteLine("Err_0356cd! ValueType change detected, please take a look"); } vt1 = mystr66; iCountTestcases++; if (!mystr6.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_045ds! ValueType change detected, please take a look"); } mystr7 = new MyStruct7(5); mystr77 = new MyStruct7(5); iCountTestcases++; if (mystr7.Equals(mystr77)) { iCountErrors++; Console.WriteLine("Err_02345cd! ValueType change detected, please take a look"); } vt1 = mystr77; iCountTestcases++; if (mystr7.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_2106fcd ValueType change detected, please take a look"); } mystr7 = new MyStruct7(5); mystr77 = new MyStruct7(15); iCountTestcases++; if (mystr7.Equals(mystr77)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } enumCol1 = Color.Red; enumCol2 = Color.Red; iCountTestcases++; if (!enumCol1.Equals(enumCol2)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } objValue1 = enumCol1; objValue2 = enumCol2; iCountTestcases++; if (!objValue1.Equals(objValue2)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } }catch (Exception exc_general) { ++iCountErrors; Console.WriteLine(s_strTFAbbrev + "Error Err_8888yyy! strLoc==" + strLoc + " ,exc_general==" + exc_general); } if (iCountErrors == 0) { Console.Error.WriteLine("paSs. " + s_strTFPath + " " + s_strTFName + " ,iCountTestcases==" + iCountTestcases); return(true); } else { Console.Error.WriteLine("FAiL! " + s_strTFPath + " " + s_strTFName + " ,iCountErrors==" + iCountErrors + " ,BugNums?: " + s_strActiveBugNums); return(false); } }
public Boolean runTest() { int iCountErrors = 0; int iCountTestcases = 0; String strLoc="123_er"; Console.Out.Write( s_strClassMethod ); Console.Out.Write( ": " ); Console.Out.Write( s_strTFPath + s_strTFName ); Console.Out.Write( ": " ); Console.Out.Write( s_strDtTmVer ); Console.Out.WriteLine( " runTest started..." ); ValueType vt1; MyStruct1 mystr1; MyStruct1 mystr11; MyStruct2 mystr2; MyStruct2 mystr22; MyStruct3 mystr3; MyStruct3 mystr33; MyStruct4 mystr4; MyStruct4 mystr44; MyStruct5 mystr5; MyStruct5 mystr55; MyStruct6 mystr6; MyStruct6 mystr66; MyStruct7 mystr7; MyStruct7 mystr77; Color enumCol1; Color enumCol2; object objValue1; object objValue2; try { mystr1 = new MyStruct1(5); mystr11 = mystr1; iCountTestcases++; if(!mystr1.Equals(mystr11)) { iCountErrors++; Console.WriteLine("Err_53vd! ValueType change detected, please take a look"); } vt1 = mystr1; iCountTestcases++; if(!vt1.Equals(mystr1)) { iCountErrors++; Console.WriteLine("Err_8536cd! ValueType change detected, please take a look"); } objValue1 = mystr1; iCountTestcases++; if(!objValue1.Equals(mystr1)) { iCountErrors++; Console.WriteLine("Err_7563fdg! ValueType change detected, please take a look"); } mystr1 = new MyStruct1(5); mystr11 = new MyStruct1(5); iCountTestcases++; if(!mystr1.Equals(mystr11)) { iCountErrors++; Console.WriteLine("Err_175td! ValueType change detected, please take a look"); } mystr1 = new MyStruct1(5); mystr2 = new MyStruct2(5); iCountTestcases++; if(mystr1.Equals(mystr2)) { iCountErrors++; Console.WriteLine("Err_62c8sb! ValueType change detected, please take a look"); } mystr2 = new MyStruct2(5); mystr22 = new MyStruct2(5); iCountTestcases++; if(!mystr2.Equals(mystr22)) { iCountErrors++; Console.WriteLine("Err_753cs! ValueType change detected, please take a look"); } mystr2 = new MyStruct2(5); mystr22 = new MyStruct2(5); vt1 = mystr22; iCountTestcases++; if(!mystr2.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_653cds! ValueType change detected, please take a look"); } mystr3 = new MyStruct3(); mystr33 = new MyStruct3(); iCountTestcases++; if(!mystr3.Equals(mystr33)) { iCountErrors++; Console.WriteLine("Err_105ds! ValueType change detected, please take a look"); } vt1 = mystr33; iCountTestcases++; if(!mystr3.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_01435xs! ValueType change detected, please take a look"); } mystr4 = new MyStruct4(5); mystr44 = new MyStruct4(15); iCountTestcases++; if(!mystr4.Equals(mystr44)) { iCountErrors++; Console.WriteLine("Err_642cd! ValueType change detected, please take a look"); } mystr44 = new MyStruct4(20); vt1 = mystr44; iCountTestcases++; if(!mystr4.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_5420csd! ValueType change detected, please take a look"); } mystr5 = new MyStruct5(5); mystr55 = new MyStruct5(5); iCountTestcases++; if(!mystr5.Equals(mystr55)) { iCountErrors++; Console.WriteLine("Err_519amg! ValueType change detected, please take a look"); } vt1 = mystr55; iCountTestcases++; if(!mystr5.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_17cdx ValueType change detected, please take a look"); } mystr5 = new MyStruct5(5); mystr55 = new MyStruct5(15); iCountTestcases++; if(mystr5.Equals(mystr55)) { iCountErrors++; Console.WriteLine("Err_105xcs! ValueType change detected, please take a look"); } mystr6 = new MyStruct6(); mystr66 = new MyStruct6(); iCountTestcases++; if(!mystr6.Equals(mystr66)) { iCountErrors++; Console.WriteLine("Err_0356cd! ValueType change detected, please take a look"); } vt1 = mystr66; iCountTestcases++; if(!mystr6.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_045ds! ValueType change detected, please take a look"); } mystr7 = new MyStruct7(5); mystr77 = new MyStruct7(5); iCountTestcases++; if(mystr7.Equals(mystr77)) { iCountErrors++; Console.WriteLine("Err_02345cd! ValueType change detected, please take a look"); } vt1 = mystr77; iCountTestcases++; if(mystr7.Equals(vt1)) { iCountErrors++; Console.WriteLine("Err_2106fcd ValueType change detected, please take a look"); } mystr7 = new MyStruct7(5); mystr77 = new MyStruct7(15); iCountTestcases++; if(mystr7.Equals(mystr77)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } enumCol1 = Color.Red; enumCol2 = Color.Red; iCountTestcases++; if(!enumCol1.Equals(enumCol2)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } objValue1 = enumCol1; objValue2 = enumCol2; iCountTestcases++; if(!objValue1.Equals(objValue2)) { iCountErrors++; Console.WriteLine("Err_0436cs! ValueType change detected, please take a look"); } }catch (Exception exc_general){ ++iCountErrors; Console.WriteLine( s_strTFAbbrev +"Error Err_8888yyy! strLoc=="+ strLoc +" ,exc_general=="+ exc_general ); } if ( iCountErrors == 0 ){ Console.Error.WriteLine( "paSs. "+ s_strTFPath +" "+ s_strTFName +" ,iCountTestcases=="+ iCountTestcases ); return true; } else { Console.Error.WriteLine( "FAiL! "+ s_strTFPath +" "+ s_strTFName +" ,iCountErrors=="+ iCountErrors +" ,BugNums?: "+ s_strActiveBugNums ); return false; } }
public Boolean runTest() { int iCountErrors = 0; int iCountTestcases = 0; String strLoc="123_er"; Console.Out.Write( s_strClassMethod ); Console.Out.Write( ": " ); Console.Out.Write( s_strTFPath + s_strTFName ); Console.Out.Write( ": " ); Console.Out.Write( s_strDtTmVer ); Console.Out.WriteLine( " runTest started..." ); ValueType vt1; MyStruct1 mystr1; MyStruct2 mystr2; MyStruct3 mystr3; MyStruct4 mystr4; MyStruct5 mystr5; MyStruct6 mystr6; MyStruct7 mystr7; Int32 iValue; try { iValue = 5; mystr1 = new MyStruct1(5); iCountTestcases++; if(mystr1.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_53vd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr1; iCountTestcases++; if(vt1.GetHashCode() != mystr1.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_8536cd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } iValue = 5; mystr2 = new MyStruct2(5); iCountTestcases++; if(mystr2.GetHashCode() != iValue*2) { iCountErrors++; Console.WriteLine("Err_539fvd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr2; iCountTestcases++; if(vt1.GetHashCode() != iValue*2) { iCountErrors++; Console.WriteLine("Err_0565cs! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } mystr3 = new MyStruct3(); iCountTestcases++; if(mystr3.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_6553cs! ValueType change detected, please take a look, " + mystr3.GetHashCode()); } vt1 = mystr3; iCountTestcases++; if(vt1.GetHashCode() != mystr3.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_014xs! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr4 = new MyStruct4(10); iCountTestcases++; if(mystr4.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_5538cd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr4; iCountTestcases++; if(vt1.GetHashCode() != mystr4.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_510apm! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } mystr5 = new MyStruct5(); iCountTestcases++; if(mystr5.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_295msn! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr5; iCountTestcases++; if(vt1.GetHashCode() != mystr5.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_0432emc! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr5 = new MyStruct5(10); iCountTestcases++; if(mystr5.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_54238ds! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr5; iCountTestcases++; if(vt1.GetHashCode() != mystr5.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_6530vf! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr6 = new MyStruct6(); iCountTestcases++; if(mystr6.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_753fsd! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr6; iCountTestcases++; if(vt1.GetHashCode() != mystr6.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_7634vcd! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr7 = new MyStruct7(5); iCountTestcases++; if(mystr7.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_653cd! ValueType change detected, please take a look, " + mystr7.GetHashCode() + " " + typeof(MyStruct7).GetHashCode()); } vt1 = mystr7; iCountTestcases++; if(vt1.GetHashCode() != mystr7.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_6537dsfc ValueType change detected, please take a look, " + vt1.GetHashCode()); } }catch (Exception exc_general){ ++iCountErrors; Console.WriteLine( s_strTFAbbrev +"Error Err_8888yyy! strLoc=="+ strLoc +" ,exc_general=="+ exc_general ); } if ( iCountErrors == 0 ){ Console.Error.WriteLine( "paSs. "+ s_strTFPath +" "+ s_strTFName +" ,iCountTestcases=="+ iCountTestcases ); return true; } else { Console.Error.WriteLine( "FAiL! "+ s_strTFPath +" "+ s_strTFName +" ,iCountErrors=="+ iCountErrors +" ,BugNums?: "+ s_strActiveBugNums ); return false; } }
public Boolean runTest() { int iCountErrors = 0; int iCountTestcases = 0; String strLoc = "123_er"; Console.Out.Write(s_strClassMethod); Console.Out.Write(": "); Console.Out.Write(s_strTFPath + s_strTFName); Console.Out.Write(": "); Console.Out.Write(s_strDtTmVer); Console.Out.WriteLine(" runTest started..."); ValueType vt1; MyStruct1 mystr1; MyStruct2 mystr2; MyStruct3 mystr3; MyStruct4 mystr4; MyStruct5 mystr5; MyStruct6 mystr6; MyStruct7 mystr7; Int32 iValue; try { iValue = 5; mystr1 = new MyStruct1(5); iCountTestcases++; if (mystr1.GetHashCode() != iValue) { iCountErrors++; Console.WriteLine("Err_53vd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr1; iCountTestcases++; if (vt1.GetHashCode() != iValue) { iCountErrors++; Console.WriteLine("Err_8536cd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } iValue = 5; mystr2 = new MyStruct2(5); iCountTestcases++; if (mystr2.GetHashCode() != iValue * 2) { iCountErrors++; Console.WriteLine("Err_539fvd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr2; iCountTestcases++; if (vt1.GetHashCode() != iValue * 2) { iCountErrors++; Console.WriteLine("Err_0565cs! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } mystr3 = new MyStruct3(); iCountTestcases++; if (mystr3.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_6553cs! ValueType change detected, please take a look, " + mystr3.GetHashCode()); } vt1 = mystr3; iCountTestcases++; if (vt1.GetHashCode() != mystr3.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_014xs! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr4 = new MyStruct4(10); iCountTestcases++; if (mystr4.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_5538cd! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } vt1 = mystr4; iCountTestcases++; if (vt1.GetHashCode() != mystr4.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_510apm! ValueType change detected, please take a look, " + mystr1.GetHashCode()); } mystr5 = new MyStruct5(); iCountTestcases++; if (mystr5.GetHashCode() != 0) { iCountErrors++; Console.WriteLine("Err_295msn! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr5; iCountTestcases++; if (vt1.GetHashCode() != 0) { iCountErrors++; Console.WriteLine("Err_0432emc! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr5 = new MyStruct5(10); iCountTestcases++; if (mystr5.GetHashCode() != 10 + 1) { iCountErrors++; Console.WriteLine("Err_54238ds! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr5; iCountTestcases++; if (vt1.GetHashCode() != 10 + 1) { iCountErrors++; Console.WriteLine("Err_6530vf! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr6 = new MyStruct6(); iCountTestcases++; if (mystr6.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_753fsd! ValueType change detected, please take a look, " + mystr5.GetHashCode()); } vt1 = mystr6; iCountTestcases++; if (vt1.GetHashCode() != mystr6.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_7634vcd! ValueType change detected, please take a look, " + vt1.GetHashCode()); } mystr7 = new MyStruct7(5); iCountTestcases++; if (mystr7.GetHashCode() == 0) { iCountErrors++; Console.WriteLine("Err_653cd! ValueType change detected, please take a look, " + mystr7.GetHashCode() + " " + typeof(MyStruct7).GetHashCode()); } vt1 = mystr7; iCountTestcases++; if (vt1.GetHashCode() != mystr7.GetHashCode()) { iCountErrors++; Console.WriteLine("Err_6537dsfc ValueType change detected, please take a look, " + vt1.GetHashCode()); } }catch (Exception exc_general) { ++iCountErrors; Console.WriteLine(s_strTFAbbrev + "Error Err_8888yyy! strLoc==" + strLoc + " ,exc_general==" + exc_general); } if (iCountErrors == 0) { Console.Error.WriteLine("paSs. " + s_strTFPath + " " + s_strTFName + " ,iCountTestcases==" + iCountTestcases); return(true); } else { Console.Error.WriteLine("FAiL! " + s_strTFPath + " " + s_strTFName + " ,iCountErrors==" + iCountErrors + " ,BugNums?: " + s_strActiveBugNums); return(false); } }