From: malaterre Date: Fri, 5 Nov 2004 21:36:02 +0000 (+0000) Subject: ENH: Do not stop test at first failure, it lower coverage. X-Git-Tag: Version0.6.bp~6 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=2dc05a84bd1562150648277f94d8d1d04efcebe7;p=gdcm.git ENH: Do not stop test at first failure, it lower coverage. --- diff --git a/Testing/TestAllReadCompareDicom.cxx b/Testing/TestAllReadCompareDicom.cxx index 7ed852ec..2fefb6bd 100644 --- a/Testing/TestAllReadCompareDicom.cxx +++ b/Testing/TestAllReadCompareDicom.cxx @@ -4,7 +4,8 @@ //Generated file: #include "gdcmDataImages.h" -int InternalTest(std::string const & filename, std::string const & referenceFileName ) +int InternalTest(std::string const & filename, + std::string const & referenceFileName ) { std::cout << " Testing: " << filename << std::endl; @@ -148,6 +149,7 @@ int TestAllReadCompareDicom(int argc, char* argv[]) << std::endl << std::endl; int i = 0; + int result = 0; while( gdcmDataImages[i] != 0 ) { ////// Check for existence of reference baseline directory @@ -185,9 +187,9 @@ int TestAllReadCompareDicom(int argc, char* argv[]) if( InternalTest( filename, referenceFileName ) != 0 ) { - return 1; + result++; } } - return 0; + return result; }