-
-
Notifications
You must be signed in to change notification settings - Fork 668
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
STYLE: Use macros in itk::SLICImageFilter
test
#4187
STYLE: Use macros in itk::SLICImageFilter
test
#4187
Conversation
Prefer using macros to exercise `itk::SLICImageFilter` basic methods: - Exercise basic object methods using the `ITK_EXERCISE_BASIC_OBJECT_METHODS`. Remove redundant calls to test the filter class and superclass names and to print the filter: rely on the basic method exercising macro call. - Refactor the helper method to return a value as the macro may return a value, and rename it to honor its purpose. - Rename the google test method to honor its contents.
Use standard exit return code in `itk::SLICImagetFilter` test.
Conform to ITK SWG style guidelines in test ending message in `itk::SLICImageFilter` test: add a message to mark the test end to match the recommended test ending message.
7ab0f35
to
d9f0d5e
Compare
itk::SLICImageFilter
coverageitk::SLICImageFilter
test
@@ -140,5 +148,6 @@ itkSLICImageFilterTest(int argc, char * argv[]) | |||
} | |||
|
|||
|
|||
return 0; | |||
std::cout << "Test finished." << std::endl; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this print statement above is useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was brought in PR #3724 and maybe several other PRs as well; memory was failing me but Dženan made it clear what I believe is one of the benefits of this. Eventually, using a macro that involves the message and the return code (cross-referencing issue #1273) could be beneficial, and bring the debate down to a single line across the whole codebase.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just add it here if it is important:
https://github.com/InsightSoftwareConsortium/ITK/blob/master/Modules/Core/TestKernel/include/itkTestDriverAfterTest.inc#L23
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the clean up!
itk::SLICImageFilter
basic methodsitk::SLICImagetFilter
testPR Checklist