STYLE: Replace char with signed char as itk::Image argument in tests
#5465
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Replaced
itk::Image<charwithitk::Image<signed char, in all"itk*Test*.cxx"source files. Removed pixel type aliasInputDataType = charfrom itkAntiAliasBinaryImageFilterTest, and directly usedsigned charinstead.The use of
charasTPixelargument in tests appears to triggers test failures, when compiling with an unsigned defaultchartype (GCC option-funsigned-charor MSVC option/J), for example:It appears clearer to explicitly specify that the pixel type should be signed, by using
signed charinstead.chartype to unsigned #5455IOComponent::CHARrepresentssigned char#5450 (comment)signed char, rather than plainchar, for numeric values, for example https://wiki.sei.cmu.edu/confluence/display/c/INT07-C.+Use+only+explicitly+signed+or+unsigned+char+type+for+numeric+values and https://rules.sonarsource.com/cpp/tag/confusing/RSPEC-810/