diff options
author | Elena Pourmal <epourmal@hdfgroup.org> | 2002-06-04 16:19:21 (GMT) |
---|---|---|
committer | Elena Pourmal <epourmal@hdfgroup.org> | 2002-06-04 16:19:21 (GMT) |
commit | 719d3964f0a97e29702faf67d6ce6fed6922b11f (patch) | |
tree | 2d7afbaf66a2390bac89d0e501c0b6444d29d3ea /test/th5s.c | |
parent | 282c92e588d606d6bf6ac618337c4e08702ef6fb (diff) | |
download | hdf5-719d3964f0a97e29702faf67d6ce6fed6922b11f.zip hdf5-719d3964f0a97e29702faf67d6ce6fed6922b11f.tar.gz hdf5-719d3964f0a97e29702faf67d6ce6fed6922b11f.tar.bz2 |
[svn-r5523]
Purpose:
Bug fix (#699), fix provided by a user, approved by Quincey
Description:
When a scalar dataspace was written to the file and then
subsequently queried with the H5Sget_simple_extent_type function,
type was reported H5S_SIMPLE instead H5S_SCALAR.
Solution:
Applied a fix and modified our test programs to exercise the case.
Platforms tested:
Solaris 2.7 and Linux 2.2.18
Diffstat (limited to 'test/th5s.c')
-rw-r--r-- | test/th5s.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/th5s.c b/test/th5s.c index 454e373..a7049b4 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -271,6 +271,7 @@ test_h5s_scalar_read(void) size_t n; /* Number of dataspace elements */ unsigned rdata; /* Scalar data read in */ herr_t ret; /* Generic return value */ + H5S_class_t ext_type; /* Extent type */ /* Output message about test being performed */ MESSAGE(5, ("Testing Scalar Dataspace Manipulation\n")); @@ -297,6 +298,10 @@ test_h5s_scalar_read(void) ret = H5Sget_simple_extent_dims(sid1, tdims, NULL); VERIFY(ret, 0, "H5Sget_simple_extent_dims"); + /* Verify extent type */ + ext_type = H5Sget_simple_extent_type(sid1); + VERIFY(ext_type, H5S_SCALAR, "H5Sget_simple_extent_type"); + ret = H5Dread(dataset, H5T_NATIVE_UINT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &rdata); CHECK(ret, FAIL, "H5Dread"); VERIFY(rdata, space3_data, "H5Dread"); |