]> Creatis software - gdcm.git/blobdiff - Testing/TestVR.cxx
Looping 10000000 times should be enought
[gdcm.git] / Testing / TestVR.cxx
index 729157a64ebaeb975260d0b7417ece0e6c70594e..26e8144f0cff02c8c4a15fbb54b88b501761d242 100644 (file)
@@ -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
                                                                                 
 =========================================================================*/
 #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;
 }