summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorElena Pourmal <epourmal@hdfgroup.org>2002-06-04 16:23:22 (GMT)
committerElena Pourmal <epourmal@hdfgroup.org>2002-06-04 16:23:22 (GMT)
commit6eb49711cb3e63b1b7d4d1a74934f55629fa83d0 (patch)
tree86eb27c2a6f3613a30ab4610a81aa94254526cef /test/th5s.c
parenta7f08bc1bb584afff9e208bc038cdc441daeaf26 (diff)
downloadhdf5-6eb49711cb3e63b1b7d4d1a74934f55629fa83d0.zip
hdf5-6eb49711cb3e63b1b7d4d1a74934f55629fa83d0.tar.gz
hdf5-6eb49711cb3e63b1b7d4d1a74934f55629fa83d0.tar.bz2
[svn-r5525]
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 of H5S_SCALAR. Solution: Applied a fix (see bug report 699) and modified out test program 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.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 64142ac..917ac2e 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -271,6 +271,7 @@ test_h5s_scalar_read(void)
hssize_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 during Reading\n"));
@@ -297,6 +298,10 @@ test_h5s_scalar_read(void)
rank = H5Sget_simple_extent_dims(sid1, tdims, NULL);
VERIFY(rank, 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");