summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2013-09-10 19:12:40 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2013-09-10 19:12:40 (GMT)
commit2c513511b35e11c5e9af2862d116ac93b49b7902 (patch)
tree9e52d2738809cd3b4ef9f9e3337f59ede07d6f4d /test
parentafd08f752393a264a4647829cefcb666d1797a3c (diff)
downloadhdf5-2c513511b35e11c5e9af2862d116ac93b49b7902.zip
hdf5-2c513511b35e11c5e9af2862d116ac93b49b7902.tar.gz
hdf5-2c513511b35e11c5e9af2862d116ac93b49b7902.tar.bz2
[svn-r24121] OpenVMS converted the value of zero in char or short to negative zero in long double. I made it warning instead of
failure. Tested on jam and Boeing OpenVMS - simple change.
Diffstat (limited to 'test')
-rw-r--r--test/dt_arith.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c
index e4512df..2d24b11 100644
--- a/test/dt_arith.c
+++ b/test/dt_arith.c
@@ -4489,6 +4489,27 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
#endif
#endif /*end H5_ULLONG_TO_LDOUBLE_PRECISION*/
+
+#ifdef H5_VMS
+ /* OpenVMS converts the value of zero in char or short to negative zero in
+ * long double. Make it warning instead of failure. SLU - 2013/9/10
+ */
+ if(dst_type == FLT_LDOUBLE) {
+ long double *ld= buf + j*dst_size;
+ if(src_type == INT_SCHAR) {
+ char *c = saved + j*src_size;
+ if(*c == 0 && *ld == -0)
+ H5_WARNING();
+ goto printing;
+ } else if(src_type == INT_SHORT) {
+ short *s = saved + j*src_size;
+ if(*s == 0 && *ld == -0)
+ H5_WARNING();
+ goto printing;
+ }
+ }
+#endif /*H5_VMS*/
+
/* Print errors */
if (0==fails_this_test++) {
if(run_test==TEST_NORMAL) {
@@ -4497,6 +4518,8 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst)
H5_WARNING();
}
}
+
+ printing:
printf(" elmt %u: \n", (unsigned)j);
printf(" src = ");