Migrated from InsightSoftwareConsortium/ITK#6358 (originally opened by @jhlegarreta) following the in-tree ingest of IOTransformDCMTK into Modules/IO/IOTransformDCMTK/.
The existing tests under Modules/IO/IOTransformDCMTK/test/ should be improved:
Current state (post-ingest)
test/itkDCMTKTransformIOTest.cxx already uses ITK_EXERCISE_BASIC_OBJECT_METHODS, ITK_TRY_EXPECT_NO_EXCEPTION, ITK_TRY_EXPECT_EXCEPTION, ITK_TEST_EXPECT_TRUE, and ITK_TEST_EXPECT_EQUAL, but still return EXIT_FAILURE; on the first nullptr dynamic_cast rather than accumulating a status.
test/ReadDicomTransformAndResampleExample.cxx is structured as an example-style driver: it uses raw try / catch blocks and per-step return EXIT_FAILURE instead of the ITK testing macros, has no ITK_EXERCISE_BASIC_OBJECT_METHODS coverage, and contains commented-out DCMTKImageIO/DCMTKSeriesFileNames paths (selected over GDCM because "DCMTKImageIO does not populate the MetaDataDictionary yet").
Suggested follow-up scope
- Convert
ReadDicomTransformAndResampleExample.cxx to a proper test driver using ITK testing macros and a testStatus accumulator.
- Reduce per-test early-returns in
itkDCMTKTransformIOTest.cxx to status-accumulating checks where it does not change the test's logical contract.
- Drop the commented-out DCMTKImageIO/DCMTKSeriesFileNames code blocks, or open a tracking issue for the missing MetaDataDictionary population if that work is still desired.
- Audit file naming against ITK conventions (
itk<Module><Subject>Test.cxx).
Tagging @jhlegarreta as the original reporter.
Migrated from InsightSoftwareConsortium/ITK#6358 (originally opened by @jhlegarreta) following the in-tree ingest of
IOTransformDCMTKintoModules/IO/IOTransformDCMTK/.The existing tests under
Modules/IO/IOTransformDCMTK/test/should be improved:ITK_TRY_EXPECT_NO_EXCEPTION,ITK_EXERCISE_BASIC_OBJECT_METHODS, etc.) to avoid boilerplate code.testStatusand update it as individual checks fail rather than early-returning).Current state (post-ingest)
test/itkDCMTKTransformIOTest.cxxalready usesITK_EXERCISE_BASIC_OBJECT_METHODS,ITK_TRY_EXPECT_NO_EXCEPTION,ITK_TRY_EXPECT_EXCEPTION,ITK_TEST_EXPECT_TRUE, andITK_TEST_EXPECT_EQUAL, but stillreturn EXIT_FAILURE;on the firstnullptrdynamic_castrather than accumulating a status.test/ReadDicomTransformAndResampleExample.cxxis structured as an example-style driver: it uses rawtry/catchblocks and per-stepreturn EXIT_FAILUREinstead of the ITK testing macros, has noITK_EXERCISE_BASIC_OBJECT_METHODScoverage, and contains commented-out DCMTKImageIO/DCMTKSeriesFileNames paths (selected over GDCM because "DCMTKImageIO does not populate the MetaDataDictionary yet").Suggested follow-up scope
ReadDicomTransformAndResampleExample.cxxto a proper test driver using ITK testing macros and atestStatusaccumulator.itkDCMTKTransformIOTest.cxxto status-accumulating checks where it does not change the test's logical contract.itk<Module><Subject>Test.cxx).Tagging @jhlegarreta as the original reporter.