]> Creatis software - gdcm.git/blobdiff - Testing/TestUtil.cxx
Avoid warnings
[gdcm.git] / Testing / TestUtil.cxx
index 9e884fbf7d57e030025b305f1d643a56efc28949..ef1ab6288c9329cca4658bbe5afb851924b004f0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/11/17 18:01:59 $
-  Version:   $Revision: 1.17 $
+  Date:      $Date: 2006/05/31 16:25:09 $
+  Version:   $Revision: 1.20 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -92,11 +92,11 @@ int TestUtil(int , char *[])
 
 
    std::cout << "Size of short int  " << sizeof(short int) << std::endl;
-   std::cout << "Size of int  " << sizeof(int) << std::endl;
-   std::cout << "Size of int* " << sizeof(int*) << std::endl;
-   std::cout << "Size of long " << sizeof(long) << std::endl;
-   std::cout << "Size of float" << sizeof(float) << std::endl;
-   std::cout << "Size of double" << sizeof(double) << std::endl;
+   std::cout << "Size of int  "       << sizeof(int)       << std::endl;
+   std::cout << "Size of int* "       << sizeof(int*)      << std::endl;
+   std::cout << "Size of long "       << sizeof(long)      << std::endl;
+   std::cout << "Size of float"       << sizeof(float)     << std::endl;
+   std::cout << "Size of double"      << sizeof(double)    << std::endl;
 
    // CreateCleanString
    std::string x = "a#@-bc\tdef";
@@ -159,7 +159,7 @@ int TestUtil(int , char *[])
 // ----------------------------------------------------------
 // Let's test gdcm::Debug, now.
     std::cout << "GetDebugFlag : " << gdcm::Debug::GetDebugFlag() <<std::endl;
-    gdcm::Debug::SetDebugFilename ("DummyFileNameToWriteTo.txt");
+    gdcm::Debug::SetOutputFileName ("DummyFileNameToWriteTo.txt");
     std::cout << "We set a Debug file"   <<std::endl;
     if ( !gdcm::Debug::GetDebugFlag() )
     {
@@ -169,7 +169,23 @@ int TestUtil(int , char *[])
     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");    
-
+    gdcm::Debug::SetOutputFileName ("DummyFileNameToWriteTo2.txt");    
+
+    std::string s1;
+    s1="azertyuiop";
+    std::cout << s1 << " --> MD5 : " << gdcm::Util::ConvertToMD5(s1)
+              <<std::endl;
+    s1="azertyuiom";    
+    std::cout <<  s1 << " --> MD5 : " << gdcm::Util::ConvertToMD5(s1)
+              <<std::endl;
+    s1="azertyuipo";
+    std::cout <<  s1 << " --> MD5 : " << gdcm::Util::ConvertToMD5(s1)
+              <<std::endl;
+    s1="qzertyuiop";
+    std::cout <<  s1 << " --> MD5 : " << gdcm::Util::ConvertToMD5(s1)
+              <<std::endl; 
+    s1="zaertyuiop";
+    std::cout <<  s1 << " --> MD5 : " << gdcm::Util::ConvertToMD5(s1)
+              <<std::endl;         
    return 0;
 }