From: malaterre Date: Sun, 25 Apr 2004 23:00:46 +0000 (+0000) Subject: Propagate GDCM_DATA_ROOT into other tests X-Git-Tag: Version0.5.bp~236 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=cecf8a0bb86a9b3223a9d02d1106a564aa6ef7f9;p=gdcm.git Propagate GDCM_DATA_ROOT into other tests --- diff --git a/Testing/TestBug.cxx b/Testing/TestBug.cxx index c63e0091..7126585c 100644 --- a/Testing/TestBug.cxx +++ b/Testing/TestBug.cxx @@ -1,5 +1,6 @@ // The following crashes on Win32 #include "gdcm.h" +#include "gdcmConfigure.h" int bug1(int argc, char* argv[]) { @@ -8,7 +9,11 @@ int bug1(int argc, char* argv[]) if (argc > 1) e1 = new gdcmHeader(argv[1]); else - e1 = new gdcmHeader("test.acr"); + { + std::string filename = GDCM_DATA_ROOT; + filename += "/test.acr"; + e1 = new gdcmHeader( filename.c_str() ); + } e1->PrintPubDict(); return 0; diff --git a/Testing/TestDicomDir.cxx b/Testing/TestDicomDir.cxx index 9b6855b7..4de300aa 100644 --- a/Testing/TestDicomDir.cxx +++ b/Testing/TestDicomDir.cxx @@ -2,6 +2,7 @@ #include "gdcm.h" #include "gdcmHeaderEntry.h" #include "gdcmDicomDir.h" +#include "gdcmConfigure.h" #include #ifdef GDCM_NO_ANSI_STRING_STREAM @@ -31,9 +32,11 @@ int testDicomDir(int argc, char* argv[]) std::string file; if (argc > 1) file = argv[1]; - else - file = "../gdcmData/DICOMDIR"; - + else { + file += GDCM_DATA_ROOT; + file += "/DICOMDIR"; + } + e1 = new gdcmDicomDir(file.c_str()); if (argc > 2) { int level = atoi(argv[2]);