]> Creatis software - gdcm.git/blob - Testing/TestVR.cxx
Test coverage
[gdcm.git] / Testing / TestVR.cxx
1 /*=========================================================================
2                                                                                 
3   Program:   gdcm
4   Module:    $RCSfile: TestVR.cxx,v $
5   Language:  C++
6   Date:      $Date: 2005/01/27 10:43:19 $
7   Version:   $Revision: 1.5 $
8                                                                                 
9   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
10   l'Image). All rights reserved. See Doc/License.txt or
11   http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
12                                                                                 
13      This software is distributed WITHOUT ANY WARRANTY; without even
14      the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15      PURPOSE.  See the above copyright notices for more information.
16                                                                                 
17 =========================================================================*/
18 #include "gdcmVR.h"
19
20 int TestVR(int , char *[])
21 {
22    gdcm::VR *tempVrDict=0;
23    std::cout << "------ Test Default VR Dictionary : ----------" << std::endl;
24   // Just to improve test coverage:
25   // tempVrDict = new gdcm::Dict("dummyFileNameThatDoesntExist");
26   // tempVrDict->Print();
27   // std::cout << "----- end Test Default VR Dictionary : -----" << std::endl;
28
29    // Lets delete it.
30    delete tempVrDict;
31
32    gdcm::VR *vr = new gdcm::VR();
33  
34    // There should be 16 entries
35    vr->Print( std::cout );
36
37    vr->IsVROfStringRepresentable( "PN" );
38    vr->IsVROfStringRepresentable( "FD" );
39
40    vr->IsVROfBinaryRepresentable( "FD" );
41    vr->IsVROfBinaryRepresentable( "PN" );
42
43    vr->IsVROfSequence( "" );
44
45    return 0;
46 }