X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestUtil.cxx;h=24c285d540078f46cfa6bd7ce1e88ddb5569440b;hb=74eaba3baaf7c13f2b2b848aaac8ba1a3ede6297;hp=fb9cb97c09203975999fb40d6060ce45e4a57137;hpb=609c6adb9848fef0dc437626b77c72a3fb68d33f;p=gdcm.git diff --git a/Testing/TestUtil.cxx b/Testing/TestUtil.cxx index fb9cb97c..24c285d5 100644 --- a/Testing/TestUtil.cxx +++ b/Testing/TestUtil.cxx @@ -1,10 +1,32 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestUtil.cxx,v $ + Language: C++ + Date: $Date: 2005/01/06 19:10:07 $ + Version: $Revision: 1.6 $ + + Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de + l'Image). All rights reserved. See Doc/License.txt or + http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +=========================================================================*/ // This test should test everything in Util, since I didn't know any other // way to test this class. -#include "gdcm.h" +#include "gdcmUtil.h" +#include int TestUtil(int , char * []) { + // Unique UID test + std::cout << gdcm::Util::CreateUniqueUID("") << std::endl; + + // DicomString test const char ref[] = "MONOCHROME1"; std::string a = "MONOCHROME1"; a += '\0'; @@ -12,10 +34,17 @@ int TestUtil(int , char * []) std::string c = gdcm::Util::DicomString("MONOCHROME1"); std::string d = "MONOCHROME1"; - if( !gdcm::Util::DicomStringEqual(a,ref) ) return 1; - if( !gdcm::Util::DicomStringEqual(b,ref) ) return 1; - if( !gdcm::Util::DicomStringEqual(c,ref) ) return 1; - if( gdcm::Util::DicomStringEqual(d,ref) ) return 1; + if( !gdcm::Util::DicomStringEqual(a,ref) ) + return 1; + if( !gdcm::Util::DicomStringEqual(b,ref) ) + return 1; + if( !gdcm::Util::DicomStringEqual(c,ref) ) + return 1; + if( gdcm::Util::DicomStringEqual(d,ref) ) + return 1; + + // MAC Adress + std::cout << "Mac Address:" << gdcm::Util::GetMACAddress() << std::endl; return 0; }