From be82f5e3cc2508c016c175ed4c632a7aab52647a Mon Sep 17 00:00:00 2001
From: mpech <maxime.pech@insa-lyon.fr>
Date: Wed, 28 Sep 2011 16:23:57 +0200
Subject: [PATCH] when a tool failed, no mhd was produced but the test still
 succeeded.

---
 tests/tools/toolTestRunner.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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;
-- 
2.49.0