diff options
author | James Laird <jlaird@hdfgroup.org> | 2004-07-20 16:28:56 (GMT) |
---|---|---|
committer | James Laird <jlaird@hdfgroup.org> | 2004-07-20 16:28:56 (GMT) |
commit | 7547be91e5d7545dae1db0ee78e4f20661e4bddb (patch) | |
tree | 13ebb4293b7a58308d741d26ac1d9cbe98f390ef /test | |
parent | 1b0b9048b75f333ff923cb440e30f3d6e1a96c42 (diff) | |
download | hdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.zip hdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.tar.gz hdf5-7547be91e5d7545dae1db0ee78e4f20661e4bddb.tar.bz2 |
[svn-r8900]
Purpose:
Bug Fix
Description:
H5Sset_extent_simple causes errors if used to reduce a space's maxdims to zero.
Solution:
H5Sset_extent_simple now cleans up the pointer. Added a regression test.
Platforms tested:
sleipnir (very minor change)
Diffstat (limited to 'test')
-rw-r--r-- | test/th5s.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/test/th5s.c b/test/th5s.c index a6b6fb4..f283b81 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -139,6 +139,18 @@ test_h5s_basic(void) VERIFY(HDmemcmp(tmax, max2, SPACE2_RANK * sizeof(hsize_t)), 0, "H5Sget_simple_extent_dims"); + /* Change max dims from zero to non-zero and back again */ + ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, max2); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + ret = H5Sset_extent_simple(sid1, SPACE1_RANK, dims1, NULL); + CHECK(ret, FAIL, "H5Sset_extent_simple"); + rank = H5Sget_simple_extent_dims(sid1, tdims, tmax); + CHECK(rank, FAIL, "H5Sget_simple_extent_dims"); + VERIFY(HDmemcmp(tdims, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, + "H5Sget_simple_extent_dims"); + VERIFY(HDmemcmp(tmax, dims1, SPACE1_RANK * sizeof(hsize_t)), 0, + "H5Sget_simple_extent_dims"); + ret = H5Sclose(sid1); CHECK(ret, FAIL, "H5Sclose"); |