summaryrefslogtreecommitdiffstats
path: root/test/th5s.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2011-04-14 19:16:53 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2011-04-14 19:16:53 (GMT)
commit9062c8583fa0ecb1609f9f3847fb6ac2bd16497c (patch)
tree7dd042710657204dc4e2866ac136a7721e2e232e /test/th5s.c
parent92897336ee3076160af74097b30308871c775366 (diff)
downloadhdf5-9062c8583fa0ecb1609f9f3847fb6ac2bd16497c.zip
hdf5-9062c8583fa0ecb1609f9f3847fb6ac2bd16497c.tar.gz
hdf5-9062c8583fa0ecb1609f9f3847fb6ac2bd16497c.tar.bz2
[svn-r20498] 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. I brought the changes from the trunk. Tested on jam - a simple change.
Diffstat (limited to 'test/th5s.c')
-rw-r--r--test/th5s.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/th5s.c b/test/th5s.c
index 7c7a95a..a5ef605 100644
--- a/test/th5s.c
+++ b/test/th5s.c
@@ -788,6 +788,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");