summaryrefslogtreecommitdiffstats
path: root/test/dtypes.c
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2004-07-28 03:51:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2004-07-28 03:51:43 (GMT)
commitd60d3679301d5587b077ae47eab091fdbb96a28d (patch)
tree4e9717e96ab1d43d157259dcb6200c5d260cb9ab /test/dtypes.c
parentae0ae159563f4d284b4062f0c838f7c91d38f338 (diff)
downloadhdf5-d60d3679301d5587b077ae47eab091fdbb96a28d.zip
hdf5-d60d3679301d5587b077ae47eab091fdbb96a28d.tar.gz
hdf5-d60d3679301d5587b077ae47eab091fdbb96a28d.tar.bz2
[svn-r8964] Purpose:
Revise new feature Description: Add buffer type and version # bytes to the encoded datatype and dataspace buffers (for H5Tencode & H5Sencode) Platforms tested: FreeBSD 4.10 (sleipnir) Too minor to require h5committest
Diffstat (limited to 'test/dtypes.c')
-rw-r--r--test/dtypes.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/dtypes.c b/test/dtypes.c
index e0fc7be..607b65a 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -1892,6 +1892,7 @@ test_encode(void)
size_t cmpd_buf_size = 0;
size_t enum_buf_size = 0;
unsigned char *cmpd_buf=NULL, *enum_buf=NULL;
+ herr_t ret;
TESTING("functions of encoding and decoding data types");
@@ -1977,6 +1978,16 @@ test_encode(void)
if(cmpd_buf_size>0)
cmpd_buf = (unsigned char*)calloc(1, cmpd_buf_size);
+ /* Try decoding bogus buffer */
+ H5E_BEGIN_TRY {
+ ret = H5Tdecode(cmpd_buf);
+ } H5E_END_TRY;
+ if(ret!=FAIL) {
+ H5_FAILED();
+ printf("Decoded bogus buffer!\n");
+ goto error;
+ }
+
if(H5Tencode(tid1, cmpd_buf, &cmpd_buf_size)<0) {
H5_FAILED();
printf("Can't encode compound type\n");