X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestDictGroupName.cxx;h=47add5e4d81a36103500af421a1fd29f7dba1cb4;hb=4906c7c31d952195d39d4820437437a1354288d7;hp=d8f41c61af4a83389ee274e6801200df72deaac3;hpb=bffe262ccd235da9f1df5c204b4b97df74757994;p=gdcm.git diff --git a/Testing/TestDictGroupName.cxx b/Testing/TestDictGroupName.cxx index d8f41c61..47add5e4 100644 --- a/Testing/TestDictGroupName.cxx +++ b/Testing/TestDictGroupName.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestDictGroupName.cxx,v $ Language: C++ - Date: $Date: 2005/04/06 08:59:46 $ - Version: $Revision: 1.2 $ + Date: $Date: 2005/10/25 14:52:30 $ + Version: $Revision: 1.4 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -21,12 +21,12 @@ #include -int CompareDictGroupName(gdcm::DictGroupName &groupName, +int CompareDictGroupName(gdcm::DictGroupName *groupName, uint16_t group,std::string ref) { - std::string val = groupName.GetName(group); + std::string val = groupName->GetName(group); std::cout << "Group : 0x" << std::hex << std::setw(4) << group - << std::dec << " : " << val << " - " + << std::dec << " : " << val << " - " << (bool)(val==ref) << std::endl; return val!=ref; @@ -34,8 +34,8 @@ int CompareDictGroupName(gdcm::DictGroupName &groupName, int TestDictGroupName(int , char *[]) { - gdcm::DictGroupName groupName; - groupName.Print( std::cout ); + gdcm::DictGroupName *groupName = gdcm::DictGroupName::New(); + groupName->Print( std::cout ); int ret = 0; @@ -44,5 +44,7 @@ int TestDictGroupName(int , char *[]) ret += CompareDictGroupName(groupName,0x7fe0,"Pixels"); ret += CompareDictGroupName(groupName,0x0007,gdcm::GDCM_UNFOUND); + groupName->Delete(); + return ret; }