[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
This commit is contained in:
Elena Pourmal 2002-06-04 11:23:22 -05:00
parent a7f08bc1bb
commit 6eb49711cb

View File

@ -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");