-
-
Notifications
You must be signed in to change notification settings - Fork 686
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
BUG: fix uninitialized memory warning in PeriodicBoundaryCondition test #2841
BUG: fix uninitialized memory warning in PeriodicBoundaryCondition test #2841
Conversation
The image buffer needs to be filled with values before usage. Also, convert a print statement to a check for an expected value.
thx @blowekamp this is much better. |
@@ -312,7 +314,7 @@ itkPeriodicBoundaryConditionTest(int, char *[]) | |||
} | |||
++testIter; | |||
} | |||
std::cout << "Dummy sum: " << sum << std::endl; | |||
ITK_TEST_EXPECT_EQUAL(sum, testSize[0] * testSize[1] * 3); |
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.
Where does the number 3
come from? Maybe you could use back.size()
instead...?
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.
Yup, that would be further improvement. I miss some of the details with that new fangled for new, when I made the change. I think this is better than a plain 12288 number it should be OK.
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.
@blowekamp Approved, of course, but please consider my comment to avoid the "magic number" 3
: #2841 (comment)
The image buffer needs to be filled with values before usage. Also,
convert a print statement to a check for an expected value.
PR Checklist
Refer to the ITK Software Guide for
further development details if necessary.