]> Creatis software - gdcm.git/blobdiff - Testing/TestUtil.cxx
* Test/VTKTest*.cxx : remove the show variable in each test method because
[gdcm.git] / Testing / TestUtil.cxx
index 8804c72023331645535fb37023808a19d5abd150..a8393de54eb51bf7df8d216356f21df695d110d4 100644 (file)
@@ -1,12 +1,33 @@
+/*=========================================================================
+                                                                                
+  Program:   gdcm
+  Module:    $RCSfile: TestUtil.cxx,v $
+  Language:  C++
+  Date:      $Date: 2005/01/21 16:07:54 $
+  Version:   $Revision: 1.7 $
+                                                                                
+  Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
+  l'Image). All rights reserved. See Doc/License.txt or
+  http://www.creatis.insa-lyon.fr/Public/Gdcm/License.html for details.
+                                                                                
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+                                                                                
+=========================================================================*/
 // This test should test everything in Util, since I didn't know any other 
 // way to test this class.
 
-#include "gdcm.h"
+#include "gdcmUtil.h"
+#include <iostream>
 
 int TestUtil(int , char * [])
 {
+   std::cout << "Time:" << gdcm::Util::GetCurrentDateTime() << std::endl;
+   // Unique UID test
    std::cout << gdcm::Util::CreateUniqueUID("") << std::endl;
    
+   // DicomString test
    const char ref[] = "MONOCHROME1";
    std::string a = "MONOCHROME1";
    a += '\0';
@@ -14,10 +35,19 @@ int TestUtil(int , char * [])
    std::string c = gdcm::Util::DicomString("MONOCHROME1");
    std::string d = "MONOCHROME1";
 
-   if( !gdcm::Util::DicomStringEqual(a,ref) ) return 1;
-   if( !gdcm::Util::DicomStringEqual(b,ref) ) return 1;
-   if( !gdcm::Util::DicomStringEqual(c,ref) ) return 1;
-   if(  gdcm::Util::DicomStringEqual(d,ref) ) return 1;
+   if( !gdcm::Util::DicomStringEqual(a,ref) ) 
+      return 1;
+   if( !gdcm::Util::DicomStringEqual(b,ref) ) 
+      return 1;
+   if( !gdcm::Util::DicomStringEqual(c,ref) ) 
+      return 1;
+   if(  gdcm::Util::DicomStringEqual(d,ref) ) 
+      return 1;
+
+   // MAC Adress
+   std::cout << "Mac Address:" << gdcm::Util::GetMACAddress() << std::endl;
+
+   std::cout << "Time:" << gdcm::Util::GetCurrentDateTime() << std::endl;
 
    return 0;
 }