X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=blobdiff_plain;f=Testing%2FTestVR.cxx;h=36710c63685b81c70ea15c84e227f1b1330b577a;hb=0b1ad8fdf8d7fc3872755852f68dd77d532e2cad;hp=6370ad926fb3b312ca6d53d26561c0223178ae2d;hpb=9649936f884197f6f6260aae051d33729bce07d5;p=gdcm.git diff --git a/Testing/TestVR.cxx b/Testing/TestVR.cxx index 6370ad92..36710c63 100644 --- a/Testing/TestVR.cxx +++ b/Testing/TestVR.cxx @@ -1,12 +1,47 @@ +/*========================================================================= + + Program: gdcm + Module: $RCSfile: TestVR.cxx,v $ + Language: C++ + Date: $Date: 2005/02/02 10:05:26 $ + Version: $Revision: 1.7 $ + + 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. + +=========================================================================*/ #include "gdcmVR.h" int TestVR(int , char *[]) { - gdcm::VR vr; - // There should be 16 entries - vr.Print( std::cout ); - vr.IsVROfGdcmStringRepresentable( "" ); - vr.IsVROfGdcmBinaryRepresentable( "" ); + gdcm::VR *tempVrDict=0; + std::cout << "------ Test Default VR Dictionary : ----------" << std::endl; + // Just to improve test coverage: + // tempVrDict = new gdcm::Dict("dummyFileNameThatDoesntExist"); + // tempVrDict->Print(); + // std::cout << "----- end Test Default VR Dictionary : -----" << std::endl; + // Lets delete it. + delete tempVrDict; + + gdcm::VR *vr = new gdcm::VR(); + + // There should be 16 entries ... + vr->Print( std::cout ); + + vr->IsVROfStringRepresentable( "PN" ); + vr->IsVROfStringRepresentable( "FD" ); + + vr->IsVROfBinaryRepresentable( "FD" ); + vr->IsVROfBinaryRepresentable( "PN" ); + + vr->IsVROfSequence( "" ); + vr->IsVROfSequence( "SQ" ); + delete vr; return 0; }