From: jpr Date: Wed, 25 Jul 2007 15:47:20 +0000 (+0000) Subject: Sometimes, fixing a bug in the library causes troubles in the Testing part... X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=f3252c8bfb8ee8d4a7bf5f896a919f601a5fd9f7;p=gdcm.git Sometimes, fixing a bug in the library causes troubles in the Testing part... (Pixels Data element *have* an even length when rewritten!) --- diff --git a/Testing/TestReadWriteReadCompare.cxx b/Testing/TestReadWriteReadCompare.cxx index 655e1282..9ded45e2 100644 --- a/Testing/TestReadWriteReadCompare.cxx +++ b/Testing/TestReadWriteReadCompare.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestReadWriteReadCompare.cxx,v $ Language: C++ - Date: $Date: 2007/06/21 14:59:06 $ - Version: $Revision: 1.29 $ + Date: $Date: 2007/07/25 15:47:20 $ + Version: $Revision: 1.30 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -101,7 +101,11 @@ int CompareInternal(std::string const &filename, std::string const &output) } // Test the data size - if (dataSize != dataSizeWritten) + // beware of odd length Pixel Element! + int dataSizeFixed = dataSize + dataSize%2; + int dataSizeWrittenFixed = dataSizeWritten + dataSizeWritten%2; + + if (dataSizeFixedFixed != dataSizeWrittenFixed) { std::cout << "Failed" << std::endl << " Pixel areas lengths differ: "