diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-09 04:18:18 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2006-10-09 04:18:18 (GMT) |
commit | 14dcb6db33f88011c3499d439c53890ab09d1ba2 (patch) | |
tree | cc05060f7dd94342c2e06726ef6b550bf4a7d8f1 /test/dt_arith.c | |
parent | 20720af231c875330a6074f65ee1c54e6a806fbb (diff) | |
download | hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.zip hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.gz hdf5-14dcb6db33f88011c3499d439c53890ab09d1ba2.tar.bz2 |
[svn-r12736] Description:
Add "use the latest format" support for dataspace object header encode/
decode routines and clean up format a bit for the latest format (new to 1.8.x
releases)
Remove storing 'perm' parameter for array datatypes in memory and the file,
and add test to make certain that if any user applications are attempting to
store them, we get some reports back. (Should be unlikely, since the RefMan
says that the parameter is not implemented and is unsupported).
Carry those changes into the tests, etc.
Clean up a bunch more compiler warnings.
Tested on:
FreeBSD/32 4.11 (sleipnir) w/threadsafe
Linux/32 2.4 (heping) w/FORTRAN & C++
Linux/64 2.4 (mir) w/enable-1.6-compat
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r-- | test/dt_arith.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c index 21a35b1..69699f7 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -390,7 +390,7 @@ static int without_hardware_g = 0; void some_dummy_func(float x); static hbool_t overflows(unsigned char *origin_bits, hid_t src_id, size_t dst_num_bits); static int my_isnan(dtype_t type, void *val); -static int my_isinf(dtype_t type, int endian, unsigned char *val, size_t size, +static int my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, size_t esize); /*------------------------------------------------------------------------- @@ -2717,7 +2717,7 @@ my_isnan(dtype_t type, void *val) *------------------------------------------------------------------------- */ static int -my_isinf(dtype_t type, int endian, unsigned char *val, size_t size, +my_isinf(int endian, unsigned char *val, size_t size, size_t mpos, size_t msize, size_t epos, size_t esize) { unsigned char *bits; @@ -2801,7 +2801,9 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) unsigned char *hw=NULL; /*ptr to hardware-conv'd*/ int underflow; /*underflow occurred */ int overflow; /*overflow occurred */ +#ifdef H5_VMS int maximal; /*maximal value occurred, for VMS only. */ +#endif /* H5_VMS */ int uflow=0; /*underflow debug counters*/ size_t j, k; /*counters */ int sendian; /* source type endianess */ @@ -3193,11 +3195,11 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (underflow && HDfabsf(x) <= FLT_MIN && HDfabsf(hw_f) <= FLT_MIN) continue; /* all underflowed, no error */ - if (overflow && my_isinf(dst_type, dendian, buf+j*sizeof(float), + if (overflow && my_isinf(dendian, buf+j*sizeof(float), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* all overflowed, no error */ #ifdef H5_VMS - if (maximal && my_isinf(dst_type, dendian, buf+j*sizeof(float), + if (maximal && my_isinf(dendian, buf+j*sizeof(float), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* maximal value, no error */ #endif /*H5_VMS*/ @@ -3209,11 +3211,11 @@ test_conv_flt_1 (const char *name, int run_test, hid_t src, hid_t dst) if (underflow && HDfabs(x) <= DBL_MIN && HDfabs(hw_d) <= DBL_MIN) continue; /* all underflowed, no error */ - if (overflow && my_isinf(dst_type, dendian, buf+j*sizeof(double), + if (overflow && my_isinf(dendian, buf+j*sizeof(double), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* all overflowed, no error */ #ifdef H5_VMS - if (maximal && my_isinf(dst_type, dendian, buf+j*sizeof(double), + if (maximal && my_isinf(dendian, buf+j*sizeof(double), dst_size, dst_mpos, dst_msize, dst_epos, dst_esize)) continue; /* maximal value, no error */ #endif /*H5_VMS*/ |