summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2002-08-26 21:01:42 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2002-08-26 21:01:42 (GMT)
commitd85657351a9252a34bd766a31c067949353ff8d0 (patch)
tree6b2724f76432177bd837c9e02f5fe8d54fc55b8c /test/tmisc.c
parent1c2937343ec131be49bb03d72edd986b51e08384 (diff)
downloadhdf5-d85657351a9252a34bd766a31c067949353ff8d0.zip
hdf5-d85657351a9252a34bd766a31c067949353ff8d0.tar.gz
hdf5-d85657351a9252a34bd766a31c067949353ff8d0.tar.bz2
[svn-r5893]
Purpose: bug fix Description: The H5Dget_storage_size test doesn't handle the situation when no compression is configured. Platforms tested: IRIX 6.5
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index c677291..06e103f 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1268,8 +1268,10 @@ test_misc8(void)
CHECK(ret, FAIL, "H5Pset_space_time");
/* Use compression as well as chunking for these datasets */
+#ifdef H5_HAVE_COMPRESSION
ret = H5Pset_deflate(dcpl,9);
CHECK(ret, FAIL, "H5Pset_deflate");
+#endif /* end H5_HAVE_COMPRESSION */
/* Create a chunked dataset, with space allocation early */
did = H5Dcreate(fid, MISC8_DSETNAME5, H5T_NATIVE_INT, sid, dcpl);
@@ -1282,10 +1284,17 @@ test_misc8(void)
/* Check the storage size after data is written */
storage_size=H5Dget_storage_size(did);
CHECK(storage_size, 0, "H5Dget_storage_size");
+#ifdef H5_HAVE_COMPRESSION
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);
}
+#else
+ 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);
+ }
+#endif /* end H5_HAVE_COMPRESSION */
/* Close dataset ID */
ret = H5Dclose(did);