X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestAllEntryVerify.cxx;h=a2dc4abc00c9b72a1150623a3b8805a3d5effd5a;hb=f0ea8af1179c35ddc83da32df10813899427214d;hp=995dcf26ac838a5a76fc2bbca008d716c200476d;hpb=0fd97a2f44764117b637de53e09b8a329ca133f8;p=gdcm.git diff --git a/Testing/TestAllEntryVerify.cxx b/Testing/TestAllEntryVerify.cxx index 995dcf26..a2dc4abc 100644 --- a/Testing/TestAllEntryVerify.cxx +++ b/Testing/TestAllEntryVerify.cxx @@ -194,11 +194,19 @@ bool ReferenceFileParser::Check() std::string testedValue = tested->GetEntryByNumber(group, element); if ( testedValue != j->second ) { - std::cout << Indent << "Uncorrect value for key " << key << std::endl - << Indent << " read value [" << testedValue << "]" << std::endl - << Indent << " reference value [" << j->second << "]" - << std::endl; + // Oops make sure this is only the \0 that differ + if( testedValue[j->second.size()] != '\0' || + strncmp(testedValue.c_str(), + j->second.c_str(), j->second.size()) != 0) + { + std::cout << Indent << "Uncorrect value for key " + << key << std::endl + << Indent << " read value [" + << testedValue << "]" << std::endl + << Indent << " reference value [" + << j->second << "]" << std::endl; return false; + } } } delete tested;