]> Creatis software - gdcm.git/blobdiff - Testing/TestUtil.cxx
Avoid warnings
[gdcm.git] / Testing / TestUtil.cxx
index 2f4f47ae4cafaf566954b2620799bbfa3dec9b31..ef1ab6288c9329cca4658bbe5afb851924b004f0 100644 (file)
@@ -3,8 +3,8 @@
   Program:   gdcm
   Module:    $RCSfile: TestUtil.cxx,v $
   Language:  C++
-  Date:      $Date: 2005/10/21 08:35:13 $
-  Version:   $Revision: 1.16 $
+  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
@@ -90,6 +90,14 @@ int TestUtil(int , char *[])
       dbl += 1.0;
    }
 
+
+   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;
+
    // CreateCleanString
    std::string x = "a#@-bc\tdef";
    std::string y = gdcm::Util::CreateCleanString(x);
@@ -151,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() )
     {
@@ -161,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;
 }