From 9dbf9e9e76f54b11d5aea482f59fcadce0e49f93 Mon Sep 17 00:00:00 2001 From: Raymond Lu Date: Fri, 7 Jan 2005 15:30:23 -0500 Subject: [svn-r9777] Purpose: Bug fix Description: Windows .NET 2003 can't handle float(double)->long_long hardware conversion. While the problem hasn't been determined, we temporarily disable that test by using a condition macro. Let Windows define that macro. Other systems don't have it defined. Platforms tested: mir and eirene. --- test/dtypes.c | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/test/dtypes.c b/test/dtypes.c index 209b0d6..d5079b3 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -6460,8 +6460,17 @@ run_float_int_conv(const char *name) #endif #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG - nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); - nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); + if(!strcmp(name, "hw")) { /* Hardware conversion */ + /* Windows .NET 2003 doesn't work for hardware conversion of this case. + * .NET should define this macro H5_HW_FLOAT_TO_LLONG_NOT_WORKS. */ +#ifndef H5_HW_FLOAT_TO_LLONG_NOT_WORKS + nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); + nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); +#endif H5_HW_FLOAT_TO_LLONG_NOT_WORKS + } else { /* Software conversion */ + nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); + nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); + } #ifdef H5_FP_TO_ULLONG_RIGHT_MAXIMUM nerrors += test_conv_int_float(name, H5T_NATIVE_FLOAT, H5T_NATIVE_ULLONG); nerrors += test_conv_int_float(name, H5T_NATIVE_DOUBLE, H5T_NATIVE_ULLONG); -- cgit v0.12