]> Creatis software - gdcm.git/blobdiff - Testing/TestBuildUpDicomDir.cxx
Fix mistypings
[gdcm.git] / Testing / TestBuildUpDicomDir.cxx
index de16a5f0a789563414d62bd434887f14c2670afb..0fa3cedaa65866fb833472151b1eb798883cc5b3 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestBuildUpDicomDir.cxx,v $
   Language:  C++
-  Date:      $Date: 2007/06/21 14:59:06 $
-  Version:   $Revision: 1.11 $
+  Date:      $Date: 2008/09/15 15:49:21 $
+  Version:   $Revision: 1.13 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -40,7 +40,7 @@ int TestBuildUpDicomDir(int argc, char *argv[])
       std::cerr << "Usage: " << argv[0] << " dummy " << std::endl;
    }
    
- // gdcm::Debug::DebugOn();
+ // GDCM_NAME_SPACE::Debug::DebugOn();
  
    bool errorFound = false; 
    GDCM_NAME_SPACE::DicomDir *dcmdir;
@@ -214,6 +214,17 @@ int TestBuildUpDicomDir(int argc, char *argv[])
       return 1;
    }
    // Check some value we are sure
+   
+   int numberOfPatients = newDicomDir->GetNumberOfPatients();
+   if (numberOfPatients != 3)
+   {
+      std::cout<<"  wrong GetNumberOfPatients() : " << newDicomDir->GetNumberOfPatients()
+               <<" (should be 3)" <<std::endl;
+
+      newDicomDir->Delete();
+      return 1;   
+   }
+   
    p1 = newDicomDir->GetFirstPatient();
    p2 = newDicomDir->GetNextPatient();
    p3 = newDicomDir->GetNextPatient();