Skip to content

Commit

Permalink
STYLE: Improve printed message style across miscellaneous tests
Browse files Browse the repository at this point in the history
Improve printed message style across miscellaneous tests:
- Remove unnecessary characters.
- Use sentence case.
- Fix typos.
- Make the printed messages be consistent and match the exercised
  methods where appropriate to improve their informative purpose.
  • Loading branch information
jhlegarreta authored and dzenanz committed Aug 31, 2023
1 parent f795943 commit 83c1c48
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions Modules/Core/Common/test/itkTimeProbeTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ itkTimeProbeTest(int, char *[])

/** Invoke GetRealTimeClock. */
itk::RealTimeStamp timeStamp = localTimer.GetRealTimeClock()->GetRealTimeStamp();
std::cout << "day " << timeStamp.GetTimeInDays() << std::endl;
std::cout << "hour " << timeStamp.GetTimeInHours() << std::endl;
std::cout << "min " << timeStamp.GetTimeInMinutes() << std::endl;
std::cout << "sec " << timeStamp.GetTimeInSeconds() << std::endl;
std::cout << "msec " << timeStamp.GetTimeInMilliSeconds() << std::endl;
std::cout << "usec " << timeStamp.GetTimeInMicroSeconds() << std::endl;
std::cout << "TimeInDays: " << timeStamp.GetTimeInDays() << std::endl;
std::cout << "TimeInHours: " << timeStamp.GetTimeInHours() << std::endl;
std::cout << "TimeInMinutes: " << timeStamp.GetTimeInMinutes() << std::endl;
std::cout << "TimeInSeconds: " << timeStamp.GetTimeInSeconds() << std::endl;
std::cout << "TimeInMilliSeconds: " << timeStamp.GetTimeInMilliSeconds() << std::endl;
std::cout << "TimeInMicroSeconds: " << timeStamp.GetTimeInMicroSeconds() << std::endl;

// Exercise the Print method
itk::Indent indent{};
Expand Down
16 changes: 8 additions & 8 deletions Modules/Core/Common/test/itkTimeProbeTest2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ itkTimeProbeTest2(int, char *[])
std::cout << "InstantValue: " << localTimer.GetInstantValue() << std::endl;
std::cout << "Minimum: " << localTimer.GetMinimum() << std::endl;
std::cout << "Mean: " << localTimer.GetMean() << std::endl;
std::cout << "Maximu: " << localTimer.GetMaximum() << std::endl;
std::cout << "Standard deviation:" << localTimer.GetStandardDeviation() << std::endl;
std::cout << "Maximum: " << localTimer.GetMaximum() << std::endl;
std::cout << "StandardDeviation: " << localTimer.GetStandardDeviation() << std::endl;

unsigned int iteration(100);

Expand Down Expand Up @@ -129,12 +129,12 @@ itkTimeProbeTest2(int, char *[])
/** Invoke GetRealTimeClock. */
itk::RealTimeStamp timeStamp = localTimer.GetRealTimeClock()->GetRealTimeStamp();
std::cout << std::endl << "Check RealTimeStamp" << std::endl;
std::cout << "day " << timeStamp.GetTimeInDays() << std::endl;
std::cout << "hour " << timeStamp.GetTimeInHours() << std::endl;
std::cout << "min " << timeStamp.GetTimeInMinutes() << std::endl;
std::cout << "sec " << timeStamp.GetTimeInSeconds() << std::endl;
std::cout << "msec " << timeStamp.GetTimeInMilliSeconds() << std::endl;
std::cout << "usec " << timeStamp.GetTimeInMicroSeconds() << std::endl;
std::cout << "TimeInDays: " << timeStamp.GetTimeInDays() << std::endl;
std::cout << "TimeInHours: " << timeStamp.GetTimeInHours() << std::endl;
std::cout << "TimeInMinutes: " << timeStamp.GetTimeInMinutes() << std::endl;
std::cout << "TimeInSeconds: " << timeStamp.GetTimeInSeconds() << std::endl;
std::cout << "TimeInMilliSeconds: " << timeStamp.GetTimeInMilliSeconds() << std::endl;
std::cout << "TimeInMicroSeconds: " << timeStamp.GetTimeInMicroSeconds() << std::endl;


std::cout << "Test finished." << std::endl;
Expand Down
8 changes: 4 additions & 4 deletions Modules/Numerics/FEM/test/itkFEMSolverHyperbolicTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -227,22 +227,22 @@ itkFEMSolverHyperbolicTest(int argc, char * argv[])
{
case 0:
// VNL
std::cout << std::endl << ">>>>>Using LinearSystemWrapperVNL" << std::endl;
std::cout << std::endl << "Using LinearSystemWrapperVNL" << std::endl;
SH->SetLinearSystemWrapper(&lsw_vnl);
break;
case 1:
// Dense VNL
std::cout << std::endl << ">>>>>Using LinearSystemWrapperDenseVNL" << std::endl;
std::cout << std::endl << "Using LinearSystemWrapperDenseVNL" << std::endl;
SH->SetLinearSystemWrapper(&lsw_dvnl);
break;
case 2:
// IT Pack
std::cout << std::endl << ">>>>>Using LinearSystemWrapperItpack" << std::endl;
std::cout << std::endl << "Using LinearSystemWrapperItpack" << std::endl;
SH->SetLinearSystemWrapper(&lsw_itpack);
break;
default:
// Sparse VNL - default
std::cout << std::endl << ">>>>>Using LinearSystemWrapperVNL" << std::endl;
std::cout << std::endl << "Using LinearSystemWrapperVNL" << std::endl;
SH->SetLinearSystemWrapper(&lsw_vnl);
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ itkOpenCVImageBridgeGrayScaleTest(int argc, char * argv[])
return EXIT_FAILURE;
}

std::cout << "scalar 513x512" << std::endl;
std::cout << "Scalar 513x512" << std::endl;
if (itkRunScalarTest<unsigned char>(argv[2]) == EXIT_FAILURE)
{
return EXIT_FAILURE;
Expand All @@ -282,7 +282,7 @@ itkOpenCVImageBridgeGrayScaleTest(int argc, char * argv[])
return EXIT_FAILURE;
}

std::cout << "two-byte pixel image" << std::endl;
std::cout << "Two-byte pixel image" << std::endl;
if (itkRunScalarTest<unsigned short>(argv[3]) == EXIT_FAILURE)
{
return EXIT_FAILURE;
Expand Down

0 comments on commit 83c1c48

Please sign in to comment.