]> Creatis software - gdcm.git/blobdiff - Testing/TestVR.cxx
Test coverage
[gdcm.git] / Testing / TestVR.cxx
index 6801c655f3c2c3436660abc2052dc669b134b6e9..1b7b047213c72da258aaca92401333e5b23c4247 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestVR.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/06 20:03:26 $
-  Version:   $Revision: 1.4 $
+  Date:      $Date: 2005/01/27 10:43:19 $
+  Version:   $Revision: 1.5 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 
 int TestVR(int , char *[])
 {
-   gdcm::VR vr;
+   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->Print( std::cout );
+
+   vr->IsVROfStringRepresentable( "PN" );
+   vr->IsVROfStringRepresentable( "FD" );
+
+   vr->IsVROfBinaryRepresentable( "FD" );
+   vr->IsVROfBinaryRepresentable( "PN" );
 
-   vr.IsVROfStringRepresentable( "" );
-   vr.IsVROfBinaryRepresentable( "" );
-   vr.IsVROfSequence( "" );
+   vr->IsVROfSequence( "" );
 
    return 0;
 }