Skip to content

Commit

Permalink
Merge pull request #2841 from blowekamp/FixPeriodicCoundaryConditionT…
Browse files Browse the repository at this point in the history
…estUninitialized

BUG: fix uninitialized memory warning in PeriodicBoundaryCondition test
  • Loading branch information
blowekamp authored Oct 27, 2021
2 parents 1bba12c + f643a51 commit da1908e
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

#include "itkPeriodicBoundaryCondition.h"
#include "itkVectorImage.h"
#include "itkTestingMacros.h"

using ImageType = itk::Image<int, 2>;
using RegionType = ImageType::RegionType;
Expand Down Expand Up @@ -290,6 +291,7 @@ itkPeriodicBoundaryConditionTest(int, char *[])
ImageType::RegionType testRegion(testSize);
testImage->SetRegions(testRegion);
testImage->Allocate();
testImage->FillBuffer(1);

using BoundaryConditionType = itk::PeriodicBoundaryCondition<ImageType, ImageType>;
using IterType = itk::ConstNeighborhoodIterator<ImageType, BoundaryConditionType>;
Expand All @@ -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);

return EXIT_SUCCESS;
}

0 comments on commit da1908e

Please sign in to comment.