diff options
author | Neil Fortner <nfortne2@hdfgroup.org> | 2008-06-26 16:18:22 (GMT) |
---|---|---|
committer | Neil Fortner <nfortne2@hdfgroup.org> | 2008-06-26 16:18:22 (GMT) |
commit | 11b12d8f962195245f083bbb4d01ea0af0c908b2 (patch) | |
tree | 81358fcfe71b79f9b58e69a437424ab8e8e9a542 /test/fillval.c | |
parent | c3a26ef4023df49a29843c82d47da3b7989de259 (diff) | |
download | hdf5-11b12d8f962195245f083bbb4d01ea0af0c908b2.zip hdf5-11b12d8f962195245f083bbb4d01ea0af0c908b2.tar.gz hdf5-11b12d8f962195245f083bbb4d01ea0af0c908b2.tar.bz2 |
[svn-r15284] Fixed bug 1155, added fillval.c back to windows test file, other minor cleanup in fillval.c.
Tested: kagiso
Same fix in trunk: kagiso (parallel), smirom, linew
Diffstat (limited to 'test/fillval.c')
-rw-r--r-- | test/fillval.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/test/fillval.c b/test/fillval.c index 29f37b4..7c72531 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -1513,7 +1513,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Initialize dataspace & hyperslab info */ for(i = 0, nelmts = 1; i < 5; i++) { - hs_size[i] = start_size[i] / 2; + hs_size[i] = (start_size[i] + 1) / 2; hs_offset[i] = 0; hs_stride[i] = 2; nelmts *= hs_size[i]; @@ -1532,7 +1532,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Select elements within file dataspace */ if(H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, hs_stride, hs_size, NULL) < 0) TEST_ERROR - /* Write to all odd data locations */ + /* Write to all even data locations */ if(H5Dwrite(dset, dtype, mspace, fspace, H5P_DEFAULT, buf) < 0) TEST_ERROR /* Close memory dataspace */ @@ -1741,6 +1741,9 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, /* Verify the element read in is the fill-value */ if(verify_rtn((unsigned)__LINE__, hs_offset, val_rd, fillval) < 0) TEST_ERROR + /* Set the element back to fillval */ + if(H5Dwrite(dset, dtype, mspace, fspace, H5P_DEFAULT, fillval) < 0) TEST_ERROR + /* Release any VL components */ if(H5Dvlen_reclaim(dtype, mspace, H5P_DEFAULT, val_rd) < 0) TEST_ERROR |