diff options
author | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-09-15 03:53:59 (GMT) |
---|---|---|
committer | Binh-Minh Ribler <bmribler@hdfgroup.org> | 2013-09-15 03:53:59 (GMT) |
commit | 27ed849cad4c7e88a540a34f46e70acde04721da (patch) | |
tree | 5182471a0d3df901b0b37a313556b5e613f7d1fb /c++/test/th5s.cpp | |
parent | a80cf34324810aa52c97586950606bbfc64b0e37 (diff) | |
download | hdf5-27ed849cad4c7e88a540a34f46e70acde04721da.zip hdf5-27ed849cad4c7e88a540a34f46e70acde04721da.tar.gz hdf5-27ed849cad4c7e88a540a34f46e70acde04721da.tar.bz2 |
[svn-r24142] Purpose: Fix bug in tests
Description:
- Passing the c_str() of an std string into a C function caused failure
on OpenVMS. Added a work around using temporary string. (th5s.cpp)
- Passing incorrect file access property list caused test_datasize() to
fail. Fixed.
- Close a group in test_dset, before the file can be properly closed.
This should fix the problem on OpenVMS.
Platforms tested:
Linux/32 2.6 (jam)
SunOS 5.11 (emu)
Linux/ppc64 (ostrich)
Diffstat (limited to 'c++/test/th5s.cpp')
-rw-r--r-- | c++/test/th5s.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/c++/test/th5s.cpp b/c++/test/th5s.cpp index 7947a9b..cfdeb1f 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()+1]; + 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); |