]> Creatis software - gdcm.git/commitdiff
Test Coverage
authorjpr <jpr>
Thu, 27 Jan 2005 12:02:26 +0000 (12:02 +0000)
committerjpr <jpr>
Thu, 27 Jan 2005 12:02:26 +0000 (12:02 +0000)
Testing/TestUtil.cxx

index 80a52a0727b0a152fd1a19617ca74b48da4053fc..969d28d78bf0af57e1c05ac67172f9f17b7f1c27 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/01/27 10:43:19 $
-  Version:   $Revision: 1.8 $
+  Date:      $Date: 2005/01/27 12:02:26 $
+  Version:   $Revision: 1.9 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -19,6 +19,7 @@
 // way to test this class.
 
 #include "gdcmUtil.h"
+#include "gdcmDebug.h"
 #include <iostream>
 
 int TestUtil(int , char * [])
@@ -59,5 +60,20 @@ int TestUtil(int , char * [])
    if(  gdcm::Util::DicomStringEqual(d,ref) ) 
       return 1;
 
+// ----------------------------------------------------------
+// Let's test gdcm::Debug, now.
+    std::cout << "GetDebugFlag : " << gdcm::Debug::GetDebugFlag() <<std::endl;
+    gdcm::Debug::SetDebugFilename ("DummyFileNameToWriteTo.txt");
+    std::cout << "We set a Debug file"   <<std::endl;
+    if ( !gdcm::Debug::GetDebugFlag() )
+    {
+       std::cout << "Debug Flag should be TRUE... " << std::endl;
+       return 1;
+    }
+    std::cout << "GetDebugFlag : " << gdcm::Debug::GetDebugFlag()<<std::endl;
+    gdcm::Debug::SetDebugFlag ( false );
+    std::cout << "GetDebugFlag : " << gdcm::Debug::GetDebugFlag()<<std::endl;
+    gdcm::Debug::SetDebugFilename ("DummyFileNameToWriteTo2.txt");    
+
    return 0;
 }