From 6eb49711cb3e63b1b7d4d1a74934f55629fa83d0 Mon Sep 17 00:00:00 2001 From: Elena Pourmal Date: Tue, 4 Jun 2002 11:23:22 -0500 Subject: [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 --- test/th5s.c | 5 +++++ 1 file changed, 5 insertions(+) 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"); -- cgit v0.12