-
-
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
ENH: Increase coverage for miscellaneous classes #4166
ENH: Increase coverage for miscellaneous classes #4166
Conversation
7a7208b
to
af8701f
Compare
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.
Looks good on a glance.
seem to be ok |
Increase coverage for miscellaneous classes: - Exercise basic object methods using the `ITK_EXERCISE_BASIC_OBJECT_METHODS` macro. - Test the boolean ivars using the `ITK_TEST_SET_GET_BOOLEAN` macro. - Use other testing macros as necessary to check for expected values. - Test the exceptions using the `ITK_TRY_EXPECT_EXCEPTION`. - Explicitly call the `Print` method when some ivars (e.g. containers of some kind) need to have some data so that the corresponding serialization statements in the `PrintSelf` method can be called. Call these methods once the instance data has been set and the filter has been updated.
af8701f
to
f710802
Compare
Note that tests may pass even if compilation errors occur or checks do not pass in |
using TransformAdapterTypeExcp44 = | ||
itk::MINCTransformAdapter<ParametersValueType, InputDimensionExcp4, OutputDimensionExcp4>; | ||
|
||
ITK_TRY_EXPECT_EXCEPTION(TransformAdapterTypeExcp44::New()); |
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.
The above three cases should ideally be done with a Cartesian product, but the template requires compile time constants. Maybe future versions of C++ will allow doing a constexpr auto prod = CartesianProduct()
(?)
Compiles fine locally (Win 10; MSVC 2022); the test is segfaulting for other reasons: cross-referencing #4175 (comment) All new checks added in this patch set pass for |
Increase coverage for miscellaneous classes:
ITK_EXERCISE_BASIC_OBJECT_METHODS
macro.ITK_TEST_SET_GET_BOOLEAN
macro.ITK_TRY_EXPECT_EXCEPTION
.Print
method when some ivars (e.g. containers of some kind) need to have some data so that the corresponding serialization statements in thePrintSelf
method can be called. Call these methods once the instance data has been set and the filter has been updated.PR Checklist