Skip to content

Commit

Permalink
BUG: fix output path for WriteImage test
Browse files Browse the repository at this point in the history
Addresses creation of test1.mha file in wrong place.

Fix the variable name and the preprocessor stringification.
  • Loading branch information
blowekamp authored and hjmjohnson committed May 31, 2024
1 parent 970908c commit d0b4eae
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Modules/IO/ImageBase/test/itkWriteImageFunctionGTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
#include "itksys/SystemTools.hxx"
#include "itkTestDriverIncludeRequiredFactories.h"

#define STRING(s) #s
#define _STRING(s) #s
#define TOSTRING(s) _STRING(s)

namespace
{
Expand All @@ -34,7 +35,7 @@ struct ITKWriteImageFunctionTest : public ::testing::Test
SetUp() override
{
RegisterRequiredFactories();
itksys::SystemTools::ChangeDirectory(STRING(ITK_TEST_OUTPUT_DIR_STR));
itksys::SystemTools::ChangeDirectory(TOSTRING(ITK_TEST_OUTPUT_DIR));
}
using ImageType = itk::Image<float, 2>;
using RegionType = ImageType::RegionType;
Expand Down

0 comments on commit d0b4eae

Please sign in to comment.