ENH: Increase coverage#2327
Conversation
3036784 to
8e4315a
Compare
8e4315a to
d6ea759
Compare
|
Follow-up of the latest comments in PR #2286:
Will push these outstanding things and some others as time permits, but will allow myself some time. I might suggest some of them as GitHub issues so as not to have them as a blocking element on a PR, and given that I might not find the time to push them forward. |
d6ea759 to
b51dfd0
Compare
dzenanz
left a comment
There was a problem hiding this comment.
Code looks good, pending fixing of the two failing tests.
b51dfd0 to
c4d5bdc
Compare
Fix Superclass name in RTTI macro.
Remove duplicate include file.
Print all member variables. Take advantage of the commit to - Use the `itk::NumericTraits::PrintType` definition, the `print_helper`-enabled overload for array-like types, and the `itkPrintSelfObjectMacro` macro to improve how the ivars and objects that can be null pointers are printed. - Print the member variables in the same order they were declared for the sake of consistency. - Print the member variable names verbatim to conform to the ITK SW Guide.
…ation` Use `itkBooleanMacro` to set `ImageSpacing` and `InterpolateSurfaceLocation` boolean member variable values to On/Off: - Deprecate `Set*(On/Off)` signatures. - Test the methods.
c4d5bdc to
56041e3
Compare
Increase the code coverage: - Add new unit tests for untested classes, including the corresponding baseline hash files. - Exercise the basic object methods using the `ITK_EXERCISE_BASIC_OBJECT_METHODS` macro. - Test the Set/Get methods using the `ITK_TEST_SET_GET_VALUE` macro. - Test the boolean ivars using the `ITK_TEST_SET_GET_BOOLEAN` macro. - Add the corresponding test arguments to the appropriate `CMakeLists.txt` test driver command. - Remove the global `try/catch` blocks and use the `ITK_TRY_EXPECT_NO_EXCEPTION` macro around the statement that is liable to throw an exception to avoid boilerplate code and to improve readability. - Test the exceptions. - Remove explicit calls to the `Print` method and rely on the basic method exercising macro call. - Improve slightly the test style to make them more consistent (e.g. input argument checking, test finishing message, make the types and variables dwell closer to the place where they are instantiated, define the image dimension as a constant; use aliases for the pixel types, etc.). - Remove unnecessary print messages.
56041e3 to
2032fa5
Compare
|
A short note related to this PR: Thanks for all the patience. I'm well aware that I put quite of a burden on the CI derived from some oversights in the commits. I'm sorry for the noise. I had noticed that the coverage increased noticeably (89.86% to 89.96%) between Feb, 15 and Feb, 16. It did not look like a hiccup since it was stable for a few days days. Not sure if it was intended or was a nice side effect of the commits merged between those days, but that was good news. And finally, this PR, standing on the shoulders of all previous efforts, made it possible to break the 90% barrier for the So great effort from the maintainers and the community to push towards a tool that is better tested. I remember Luis' call to the mailing list in 2014 to increase the coverage :-). I think he would be glad to know this. |
Improvements concerning testing and a few related enhancements:
Superclassname.itkBooleanMacroto set the boolean ivar values to On/Off.PR Checklist