diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-23 12:43:58 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2002-08-23 12:43:58 (GMT) |
commit | caf088c960fdb13bf6ed768472fb7c675a843ec0 (patch) | |
tree | 41ee7e1682b2b2d63a412062fda8ed61edab5278 /test/tmisc.c | |
parent | a2567e36f04594afe382abf44b8bd1ea34bcf299 (diff) | |
download | hdf5-caf088c960fdb13bf6ed768472fb7c675a843ec0.zip hdf5-caf088c960fdb13bf6ed768472fb7c675a843ec0.tar.gz hdf5-caf088c960fdb13bf6ed768472fb7c675a843ec0.tar.bz2 |
[svn-r5887] Purpose:
Regression test for bug fix
Description:
Adjust selection so chunked data needs to be read from pre-allocated chunks
w/filters, to verify that filter is applied correctly.
Platforms tested:
FreeBSD 4.6 (sleipnir) w/parallel
Diffstat (limited to 'test/tmisc.c')
-rw-r--r-- | test/tmisc.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/test/tmisc.c b/test/tmisc.c index 7f6eaa1..c677291 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -1106,8 +1106,8 @@ test_misc8(void) /* Select a hyperslab which coincides with chunk boundaries */ /* (For later use) */ - start[0]=0; start[1]=0; - count[0]=MISC8_CHUNK_DIM0*2; count[1]=MISC8_CHUNK_DIM1*2; + start[0]=1; start[1]=1; + count[0]=(MISC8_CHUNK_DIM0*2)-1; count[1]=(MISC8_CHUNK_DIM1*2)-1; ret = H5Sselect_hyperslab(sid,H5S_SELECT_SET,start,NULL,count,NULL); CHECK(ret, FAIL, "H5Sselect_hyperslab"); @@ -1275,10 +1275,17 @@ test_misc8(void) did = H5Dcreate(fid, MISC8_DSETNAME5, H5T_NATIVE_INT, sid, dcpl); CHECK(did, FAIL, "H5Dcreate"); + /* Write part of the dataset */ + ret = H5Dwrite(did, H5T_NATIVE_INT, sid, sid, H5P_DEFAULT, wdata); + CHECK(ret, FAIL, "H5Dwrite"); + /* Check the storage size after data is written */ storage_size=H5Dget_storage_size(did); CHECK(storage_size, 0, "H5Dget_storage_size"); - VERIFY(storage_size, MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT), "H5Dget_storage_size"); + if(storage_size>=(MISC8_DIM0*MISC8_DIM1*H5Tget_size(H5T_NATIVE_INT))) { + num_errs++; + printf("Error on line %d: data wasn't compressed! storage_size=%u\n",__LINE__,(unsigned)storage_size); + } /* Close dataset ID */ ret = H5Dclose(did); |