diff options
-rw-r--r-- | c++/test/dsets.cpp | 11 | ||||
-rw-r--r-- | c++/test/th5s.cpp | 5 |
2 files changed, 7 insertions, 9 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 744118f..a24f5f1 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -61,7 +61,6 @@ const int H5Z_FILTER_BOGUS = 305; static size_t filter_bogus(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_values, size_t nbytes, size_t *buf_size, void **buf); - /*------------------------------------------------------------------------- * Function: test_create * @@ -284,14 +283,13 @@ test_simple_io( H5File& file) *------------------------------------------------------------------------- */ static herr_t -test_datasize() +test_datasize(FileAccPropList &fapl) { - SUBTEST("DataSet::getInMemDataSize()"); try { // Open FILE1. - H5File file(FILE1, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, FileAccPropList::DEFAULT); + H5File file(FILE1, H5F_ACC_RDWR, FileCreatPropList::DEFAULT, fapl); // Open dataset DSET_SIMPLE_IO_NAME. DataSet dset = file.openDataSet (DSET_SIMPLE_IO_NAME); @@ -333,7 +331,6 @@ test_datasize() } } // test_datasize - /*------------------------------------------------------------------------- * Function: test_tconv * @@ -456,7 +453,6 @@ filter_bogus(unsigned int flags, size_t cd_nelmts, return nbytes; } - /*------------------------------------------------------------------------- * Function: test_compression * @@ -826,7 +822,6 @@ test_multiopen (H5File& file) } } // test_multiopen - /*------------------------------------------------------------------------- * Function: test_types * @@ -1074,7 +1069,7 @@ void test_dset() // Close the file before testing data size. file.close(); - nerrors += test_datasize() <0 ? 1:0; + nerrors += test_datasize(fapl) <0 ? 1:0; } catch (Exception E) { diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 7947a9b..4c1540e 100644 --- a/c++/test/th5s.cpp +++ b/c++/test/th5s.cpp @@ -188,7 +188,10 @@ 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. */ - const char *testfile = H5_get_srcdir_filename(TESTFILE.c_str()); + char *tmp_str = new char[TESTFILE.length()]; + strcpy(tmp_str, TESTFILE.c_str()); + const char *testfile = H5_get_srcdir_filename(tmp_str); + delete tmp_str; // Create file H5File fid1(testfile, H5F_ACC_RDONLY); |