diff options
author | Allen Byrne <byrn@hdfgroup.org> | 2015-08-05 21:01:07 (GMT) |
---|---|---|
committer | Allen Byrne <byrn@hdfgroup.org> | 2015-08-05 21:01:07 (GMT) |
commit | 9e2434625dde11a19b46a5154477247266792219 (patch) | |
tree | 7e7b94935a7acdf8024ec464218c564dccf52963 /test/dt_arith.c | |
parent | 0b4b73331d2cd4d6d3433e8bc5c45011f75d6fd3 (diff) | |
download | hdf5-9e2434625dde11a19b46a5154477247266792219.zip hdf5-9e2434625dde11a19b46a5154477247266792219.tar.gz hdf5-9e2434625dde11a19b46a5154477247266792219.tar.bz2 |
[svn-r27469] Merge from trunk with dual-binary CMake code.
Tested: local linux with CMake
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r-- | test/dt_arith.c | 56 |
1 files changed, 56 insertions, 0 deletions
diff --git a/test/dt_arith.c b/test/dt_arith.c index 8ededc7..b3f5cad 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -5032,8 +5032,32 @@ run_int_fp_conv(const char *name) #endif #endif /* H5_SIZEOF_LONG!=H5_SIZEOF_INT */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_LLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler error in handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ +#if H5_LLONG_TO_LDOUBLE_CORRECT nerrors += test_conv_int_fp(name, TEST_NORMAL, H5T_NATIVE_ULLONG, H5T_NATIVE_LDOUBLE); +#else /* H5_LLONG_TO_LDOUBLE_CORRECT */ + { + char str[256]; /*hello string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "unsigned long long", "long double"); + printf("%-70s", str); + SKIPPED(); + HDputs(" Test skipped due to compiler not handling conversion."); + } +#endif /* H5_LLONG_TO_LDOUBLE_CORRECT */ #endif #endif @@ -5134,8 +5158,40 @@ run_fp_int_conv(const char *name) #endif /*H5_SIZEOF_LONG!=H5_SIZEOF_INT && H5_SIZEOF_LONG_DOUBLE!=0 */ #if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG && H5_SIZEOF_LONG_DOUBLE!=0 +#ifdef H5_LDOUBLE_TO_LLONG_ACCURATE nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_LLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ +#if defined(H5_LDOUBLE_TO_LLONG_ACCURATE) nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_LDOUBLE, H5T_NATIVE_ULLONG); +#else /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ + { + char str[256]; /*string */ + + HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", + name, "long double", "unsigned long long"); + printf("%-70s", str); + SKIPPED(); +#if H5_SIZEOF_LONG_DOUBLE!=0 + HDputs(" Test skipped due to hardware conversion error."); +#else + HDputs(" Test skipped due to disabled long double."); +#endif + } +#endif /*H5_LDOUBLE_TO_LLONG_ACCURATE*/ #endif #endif #ifndef H5_VMS |