From: mpech Date: Wed, 28 Sep 2011 14:23:57 +0000 (+0200) Subject: when a tool failed, no mhd was produced but the test still succeeded. X-Git-Tag: v1.3.0~214^2~1 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=be82f5e3cc2508c016c175ed4c632a7aab52647a;p=clitk.git when a tool failed, no mhd was produced but the test still succeeded. --- diff --git a/tests/tools/toolTestRunner.cxx b/tests/tools/toolTestRunner.cxx index 753aa37..b2aa36c 100644 --- a/tests/tools/toolTestRunner.cxx +++ b/tests/tools/toolTestRunner.cxx @@ -151,6 +151,7 @@ int main(int argc, char** argv){ //run the command line system(cmd_line.str().c_str()); + assertFalse(!itksys::SystemTools::FileExists(outFile.c_str(), true), "no mhd have been generated"); //compare source files #ifdef _WIN32 @@ -162,7 +163,6 @@ int main(int argc, char** argv){ #else assertFalse(!mhdCmp(outFile.c_str(), refFile), "Generated mhd file != ref File"); #endif - std::string refRawFile = mhdToRawName(strRefFile); std::string rawFile = mhdToRawName(outFile); @@ -176,7 +176,7 @@ int main(int argc, char** argv){ remove(rawFile.c_str()); } //neither the mhd is - remove(outFile.c_str()); + //remove(outFile.c_str()); //success return 0;