X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=tests%2Ftools%2FtoolTestRunner.cxx;h=a4795ee8781fc1e6d4e73fb4b71bf55024a1019e;hb=e0ebf1a64a59619732afac9476efd97fc9a2dcb6;hp=8a49c43e1cedb0561fe41068877fa7b7d23ecd6f;hpb=fb0b005e5c6c80ce73a0cf50a18aa9fc45a27430;p=clitk.git diff --git a/tests/tools/toolTestRunner.cxx b/tests/tools/toolTestRunner.cxx index 8a49c43..a4795ee 100644 --- a/tests/tools/toolTestRunner.cxx +++ b/tests/tools/toolTestRunner.cxx @@ -78,6 +78,11 @@ void dosToUnixFile(std::string dosFile, std::string unixedFile){ } #endif + +std::string mhdToRawName(const std::string &mhdName){ + int found = mhdName.find_last_of("."); + return mhdName.substr(0, found)+".raw"; +} /** * argv * [1] executable @@ -90,7 +95,8 @@ void dosToUnixFile(std::string dosFile, std::string unixedFile){ int main(int argc, char** argv){ //reference file must exist or we fail char* refFile = argv[argc-1]; - assertFalse(!(itksys::SystemTools::FileExists(refFile, true)), "refFile "+std::string(refFile)+" doesn't exist"); + std::string strRefFile = std::string(refFile); + assertFalse(!(itksys::SystemTools::FileExists(refFile, true)), "refFile "+strRefFile+" doesn't exist"); std::ostringstream cmd_line; cmd_line<