Open jhlegarreta opened 5 years ago
The most logical place would be itkMacro.h
. And the bulk of the work would be changing the code to use the new macro.
Also, use of a macro instead of try/catch block in the examples would be confusing for new users, who are familiar with C++ try/catch but not (yet) familiar with ITK conventions.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
Related to the issue is marking the end of tests: https://github.com/InsightSoftwareConsortium/ITK/pull/2196#discussion_r546761209.
This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.
This is still relevant stale bot.
In a broader scope, the whole argument checking method could be put into a macro, providing the required and optional argument names as parameters so that they are printed by the macro itself as well.
Description
The ITK SW Guide states in the
Messages in Tests
subsection of its Coding Style Guide appendix:Their adoption seems low. May be proposing macros to ease the process, reduce verbosity and reduce boilerplate code would help.
This does also apply to Examples.
Expected behavior
Missing parameter and regression check messages in tests and examples be consistent, e.g.:
or
Printing the provided argument count and the argument values could also be considered, like in https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/IO/NIFTI/test/itkNiftiReadWriteDirectionTest.cxx#L35
Actual behavior
Missing parameter and regression check messages in tests and examples are not consistent, e.g
Cases (
Usage
vsusage
), etc.and regressions are still less consistent.
Additional Information
Some of the names of the macros, e.g.
itkNameOfTestExecutableMacro
would need to be changed so that they honor also their use in ITK Examples.And this would also mean placing these macros in a file other than
itkTestingMacros.h
, since they would also serve for the Examples.