]> Creatis software - gdcm.git/blobdiff - Testing/TestValidate.cxx
Modify TestValidate to compile with New() vs new
[gdcm.git] / Testing / TestValidate.cxx
index 6162fcf6342a9b320099670bcf558ce817d5594b..721581b4e847d7bea7ef2924388709c1f5d2b659 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestValidate.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/06/14 20:33:53 $
-  Version:   $Revision: 1.1 $
+  Date:      $Date: 2005/11/03 16:11:56 $
+  Version:   $Revision: 1.3 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
 int TestValidate(int argc, char *argv[])
 {
   if( argc < 2 )
-    {
-    std::cerr << "ouh les cornes" << std::endl;
+  {
+    std::cerr << "ouh les cornes / shame on you" << std::endl;
     return 1;
-    }
+  }
 
-  const char *filename = argv[1];
+   const char *filename = argv[1];
 
-   gdcm::File *input = new gdcm::File( filename );
+   gdcm::File *input =  gdcm::File::New( );
+   input->SetFileName(filename);
+   input->Load();
    gdcm::Validator *v = new gdcm::Validator();
    v->SetInput( input );