X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestVR.cxx;h=26e8144f0cff02c8c4a15fbb54b88b501761d242;hb=5f8357abe8e207fd7d21031ca0c96871cb53858e;hp=729157a64ebaeb975260d0b7417ece0e6c70594e;hpb=1d9ac5cec02b9daa18b16835882b531731b125ad;p=gdcm.git diff --git a/Testing/TestVR.cxx b/Testing/TestVR.cxx index 729157a6..26e8144f 100644 --- a/Testing/TestVR.cxx +++ b/Testing/TestVR.cxx @@ -3,8 +3,8 @@ Program: gdcm Module: $RCSfile: TestVR.cxx,v $ Language: C++ - Date: $Date: 2005/10/18 12:58:25 $ - Version: $Revision: 1.8 $ + Date: $Date: 2005/10/25 14:52:31 $ + Version: $Revision: 1.11 $ Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de l'Image). All rights reserved. See Doc/License.txt or @@ -16,12 +16,15 @@ =========================================================================*/ #include "gdcmVR.h" +#include "gdcmDebug.h" int TestVR(int , char *[]) { int error = 0; - gdcm::VR *vr = new gdcm::VR(); + gdcm::VR *vr = gdcm::VR::New(); + gdcm::Debug::DebugOn(); + // There should be 16 entries ... vr->Print( std::cout ); @@ -46,6 +49,11 @@ int TestVR(int , char *[]) std::cerr << "' ' is a valid VR" << std::endl; error++; } + if( vr->IsValidVR( "\000/" ) ) + { + std::cerr << "' /' is a valid VR" << std::endl; + error++; + } if( vr->IsValidVR( gdcm::GDCM_VRUNKNOWN ) ) { std::cerr << "' ' is a valid VR" << std::endl; @@ -88,6 +96,6 @@ int TestVR(int , char *[]) error++; } - delete vr; + vr->Delete(); return error; }