#include <itksys/SystemTools.hxx>
static inline void compare(std::string mhd, std::string refMhd, std::string refRaw){
std::ostringstream cmd_line;
#include <itksys/SystemTools.hxx>
static inline void compare(std::string mhd, std::string refMhd, std::string refRaw){
std::ostringstream cmd_line;
cmd_line << TOOLS_PATH<<"clitkAffineTransform -i " << mhd << " -o "<<"out.mhd >/dev/null";
system(cmd_line.str().c_str());
cmd_line << TOOLS_PATH<<"clitkAffineTransform -i " << mhd << " -o "<<"out.mhd >/dev/null";
system(cmd_line.str().c_str());
- EXPECT_FALSE( itksys::SystemTools::FilesDiffer("out.raw", refRaw.c_str()) );
+
+ //Check the raw and the produced raw are different
+ EXPECT_TRUE( itksys::SystemTools::FilesDiffer("out.raw", refRaw.c_str()) );
+
+ //clean the produced junk
std::string mhd1=std::string(CLITK_DATA_PATH)+"Deformation4D.mhd";
std::string refMhd1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.mhd";
std::string refRaw1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.raw";
std::string mhd1=std::string(CLITK_DATA_PATH)+"Deformation4D.mhd";
std::string refMhd1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.mhd";
std::string refRaw1=std::string(CLITK_DATA_PATH)+"Deformation4DRef.raw";