]> Creatis software - gdcm.git/blobdiff - Testing/TestValidate.cxx
Fix mistypings
[gdcm.git] / Testing / TestValidate.cxx
index dcd973009005225323272b49d6cd410786781051..ebe4a32e109092c9211cf0688a03d6ae396bfbb1 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestValidate.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/07 11:03:22 $
-  Version:   $Revision: 1.5 $
+  Date:      $Date: 2007/06/21 14:59:06 $
+  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
@@ -18,6 +18,9 @@
 #include "gdcmFile.h"
 #include "gdcmValidator.h"
 
+#include "gdcmGlobal.h"
+#include "gdcmDictSet.h"
+
 //Generated file:
 #include "gdcmDataImages.h"
 
@@ -25,11 +28,13 @@ int Validate(std::string const &filename);
 
 int Validate(std::string const &filename)
 {
-   gdcm::File *input =  gdcm::File::New( );
+   GDCM_NAME_SPACE::File *input =  GDCM_NAME_SPACE::File::New( );
    input->SetFileName(filename);
    input->Load();
-   gdcm::Validator *v = new gdcm::Validator();
+   GDCM_NAME_SPACE::Validator *v = GDCM_NAME_SPACE::Validator::New();
    v->SetInput( input );
+   input->Delete();
+   v->Delete();
    return 1; // allways true (we don't want to break the test suite)
 } 
 
@@ -52,9 +57,8 @@ int TestValidate(int argc, char *argv[])
       return 1;
    }
    
-
    int i =0;
-   int retVal = 0;  //by default this is an error
+   int retVal = 0;  //by default : *no* error
    while( gdcmDataImages[i] != 0 )
    {
       std::string filename = GDCM_DATA_ROOT;