summaryrefslogtreecommitdiffstats
path: root/c++/test/th5s.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'c++/test/th5s.cpp')
-rw-r--r--c++/test/th5s.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp
index e6ed440..7947a9b 100644
--- a/c++/test/th5s.cpp
+++ b/c++/test/th5s.cpp
@@ -188,13 +188,7 @@ static void test_h5s_basic()
* If this test fails and the H5S_MAX_RANK variable has changed, follow
* the instructions in space_overflow.c for regenating the th5s.h5 file.
*/
- char testfile[512]="";
- char *srcdir = getenv("srcdir");
- if (srcdir && ((strlen(srcdir) + strlen(TESTFILE.c_str()) + 1) < sizeof(testfile))){
- strcpy(testfile, srcdir);
- strcat(testfile, "/");
- }
- strcat(testfile, TESTFILE.c_str());
+ const char *testfile = H5_get_srcdir_filename(TESTFILE.c_str());
// Create file
H5File fid1(testfile, H5F_ACC_RDONLY);
@@ -575,7 +569,6 @@ extern "C"
void test_h5s()
{
// Output message about test being performed
- //MESSAGE("Testing Dataspaces\n");
MESSAGE(5, ("Testing Dataspaces\n"));
test_h5s_basic(); // Test basic H5S code