summaryrefslogtreecommitdiffstats
path: root/test/dt_arith.c
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2015-08-14 19:58:54 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2015-08-14 19:58:54 (GMT)
commitc27d1808480a4ffae4af5ff5384993f63ea6b5d4 (patch)
tree251081393f02ad4fb6767af9d23be50971761d79 /test/dt_arith.c
parent37b14fd3ed8aae8f3b83df03ca29f82178c25f8f (diff)
parentd3e931c772a1fea1d8d0676dd6dd3fe95b000d9e (diff)
downloadhdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.zip
hdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.tar.gz
hdf5-c27d1808480a4ffae4af5ff5384993f63ea6b5d4.tar.bz2
[svn-r27507] Merge of r27237-27500 from the trunk.
Tested w/ h5committest NOTES: - The manifest may still be messed up. - Cmake fails since the dual binary work needs to be merged with this repo's CMake externals.
Diffstat (limited to 'test/dt_arith.c')
-rw-r--r--test/dt_arith.c56
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