public virtual bool runTest()
{
Console.Error.WriteLine( "Co1504get_DayOfYear runTest() started." );
String strLoc="Loc_000oo";
StringBuilder sblMsg = new StringBuilder( 99 );
int iCountErrors = 0;
int iCountTestcases = 0;
DateTime dt2;
int inDOY2 = -2;
try
{
LABEL_860_GENERAL:
do
{
strLoc="100bb";
dt2 = new DateTime
(
1999
,2
,1
,23
,58
,59
);
inDOY2 = dt2.DayOfYear;
++iCountTestcases;
if ( inDOY2 != 32 )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Err_162hc! inDOY2=="+ inDOY2 );
}
strLoc="110cc";
dt2 = new DateTime
(
1999
,1
,1
,00
,00
,00
);
inDOY2 = dt2.DayOfYear;
++iCountTestcases;
if ( inDOY2 != 1 )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Err_163wc! inDOY2=="+ inDOY2 );
}
strLoc="120dd";
dt2 = new DateTime
(
2000
,12
,31
,23
,59
,59
);
inDOY2 = dt2.DayOfYear;
++iCountTestcases;
if ( inDOY2 != 366 )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Err_164rc! inDOY2=="+ inDOY2 );
}
strLoc="130ee";
dt2 = new DateTime
(
2000
,2
,29
,11
,11
,11
);
inDOY2 = dt2.DayOfYear;
++iCountTestcases;
if ( inDOY2 != 60 )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Err_165tc! inDOY2=="+ inDOY2 );
}
strLoc="140ff";
dt2 = new DateTime
(
2000
,2
,28
,11
,11
,11
);
inDOY2 = dt2.DayOfYear;
++iCountTestcases;
if ( inDOY2 != 59 )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Err_166yc! inDOY2=="+ inDOY2 );
}
} while ( false );
}
catch( Exception exc_general )
{
++iCountErrors;
Console.Error.WriteLine( "POINTTOBREAK: Error Err_343un! (Co1504get_DayOfYear) exc_general==" + exc_general );
Console.Error.WriteLine( "EXTENDEDINFO: (Err_343un) strLoc==" + strLoc );
}
if ( iCountErrors == 0 )
{
Console.Error.WriteLine( "paSs. Co1504get_DayOfYear.cs iCountTestcases==" + iCountTestcases );
return true;
}
else
{
Console.Error.WriteLine( "FAiL! Co1504get_DayOfYear.cs iCountErrors==" + iCountErrors );
return false;
}
}
public static void Main( String[] args )