diff options
author | Raymond Lu <songyulu@hdfgroup.org> | 2011-04-14 17:24:03 (GMT) |
---|---|---|
committer | Raymond Lu <songyulu@hdfgroup.org> | 2011-04-14 17:24:03 (GMT) |
commit | 824dc864bf953e2866a83c03d3bb209b0195fa0b (patch) | |
tree | 37e6ca79bd1e3815849cab8fe75eaae07769b6c4 /test | |
parent | ce35ebecfb51fd09b0248fb0388917aec43e261e (diff) | |
download | hdf5-824dc864bf953e2866a83c03d3bb209b0195fa0b.zip hdf5-824dc864bf953e2866a83c03d3bb209b0195fa0b.tar.gz hdf5-824dc864bf953e2866a83c03d3bb209b0195fa0b.tar.bz2 |
[svn-r20496] Bug 1386 - allow dimension size to be zero even though it isn't unlimited. I made a change in H5Sset_extent_simple to
forbid setting the dimension size bigger than existing maximal size. In this checkin, I restored it to the previous
behavior that any change will wipe out previous record of dimensionality.
Tested on jam - a simple change.
Diffstat (limited to 'test')
-rw-r--r-- | test/th5s.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/test/th5s.c b/test/th5s.c index 916feb6..d0d176a 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -145,8 +145,6 @@ test_h5s_basic(void) "H5Sget_simple_extent_dims"); /* Change max dims to be equal to the dimensions */ - /*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); @@ -785,6 +783,14 @@ test_h5s_zero_dim(void) } } + /* Now extend the first dimension size of the dataset to SPACE1_DIM1*3 past the maximal size. + * It is supposed to fail. */ + extend_dims[0] = SPACE1_DIM1*3; + H5E_BEGIN_TRY { + ret = H5Dset_extent(dset1, extend_dims); + } H5E_END_TRY; + VERIFY(ret, FAIL, "H5Dset_extent"); + ret = H5Pclose(plist_id); CHECK(ret, FAIL, "H5Pclose"); |