From 7bdd4ed41f1fac07c853be292b2f5fb73a5b2ccb Mon Sep 17 00:00:00 2001 From: Quincey Koziol Date: Fri, 12 Jan 2001 14:57:33 -0500 Subject: [svn-r3281] Purpose: Bug fix Description: Datasets were allowed to be created with chunks larger than the maximum dimension for each dimension. Solution: Wrote test to verify new error checking is working correctly. Platforms tested: FreeBSD 4.2 (hawkwind) --- test/dsets.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/dsets.c b/test/dsets.c index 6b60991..824e000 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -114,6 +114,22 @@ test_create(hid_t file) */ create_parms = H5Pcreate(H5P_DATASET_CREATE); assert(create_parms >= 0); + + /* Attempt to create a dataset with invalid chunk sizes */ + csize[0] = dims[0]*2; + csize[1] = dims[1]*2; + status = H5Pset_chunk(create_parms, 2, csize); + assert(status >= 0); + H5E_BEGIN_TRY { + dataset = H5Dcreate(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, + create_parms); + } H5E_END_TRY; + if (dataset >= 0) { + FAILED(); + puts(" Opened a dataset with incorrect chunking parameters."); + goto error; + } + csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); -- cgit v0.12