summaryrefslogtreecommitdiffstats
path: root/c++/test/dsets.cpp
diff options
context:
space:
mode:
authorBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-15 03:53:59 (GMT)
committerBinh-Minh Ribler <bmribler@hdfgroup.org>2013-09-15 03:53:59 (GMT)
commit27ed849cad4c7e88a540a34f46e70acde04721da (patch)
tree5182471a0d3df901b0b37a313556b5e613f7d1fb /c++/test/dsets.cpp
parenta80cf34324810aa52c97586950606bbfc64b0e37 (diff)
downloadhdf5-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/dsets.cpp')
-rw-r--r--c++/test/dsets.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp
index 643762b..58436f1 100644
--- a/c++/test/dsets.cpp
+++ b/c++/test/dsets.cpp
@@ -283,13 +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);
@@ -1067,9 +1067,12 @@ void test_dset()
nerrors += test_multiopen (file)<0 ?1:0;
nerrors += test_types(file)<0 ?1:0;
+ // Close group "emit diagnostics".
+ grp.close();
+
// 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)
{