]> Creatis software - gdcm.git/blobdiff - Testing/TestBug.cxx
ENH: Adding 'gdcm' namespace. Be nice with me this was a ~13000 lines patch. Also...
[gdcm.git] / Testing / TestBug.cxx
index c63e0091ec0cb425fe1a8698967ac0a44a2f279c..157360c1af33ffa527aead16d6127cec95e8c9ea 100644 (file)
@@ -1,18 +1,23 @@
 // The following crashes on Win32
+// We have to be carefull when the code both use cout + printf VC++ gets
+// confused, thus make sure we use only one kind of iostream
+
 #include "gdcm.h"
 
-int bug1(int argc, char* argv[])
+int TestBug(int argc, char* argv[])
 {  
-       gdcmHeader* e1;
-       
-       if (argc > 1)
-               e1 = new gdcmHeader(argv[1]);
-       else
-               e1 = new gdcmHeader("test.acr");
-       e1->PrintPubDict();
+  gdcm::Header* e1;
+
+   if (argc > 1)
+      e1 = new gdcm::Header( argv[1] );
+   else {
+      std::string filename = GDCM_DATA_ROOT;
+      filename += "/test.acr";
+      e1 = new gdcm::Header( filename.c_str() );
+   }
+   //e1->PrintPubDict();
+   //e1->GetPubDict()->GetEntriesByKey();
+   e1->GetPubDict()->PrintByKey();
 
   return 0;
 }
-
-
-