summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRaymond Lu <songyulu@hdfgroup.org>2005-02-24 22:54:05 (GMT)
committerRaymond Lu <songyulu@hdfgroup.org>2005-02-24 22:54:05 (GMT)
commitb0c346caa201cdc5bf40a314910ac33c75ba8951 (patch)
tree808620c125a73088971c3b6291a58cb137593d79 /test
parentb67493fcda5ffe9f51b65ee95ca23714b7d9a555 (diff)
downloadhdf5-b0c346caa201cdc5bf40a314910ac33c75ba8951.zip
hdf5-b0c346caa201cdc5bf40a314910ac33c75ba8951.tar.gz
hdf5-b0c346caa201cdc5bf40a314910ac33c75ba8951.tar.bz2
[svn-r10081] Purpose: Some Kind of Verification
Description: The library didn't handle incorrect hardware conversion for datatype. It simply did convert to incorrect data if any hardware didn't handle correctly. Solution: During configuration, incorrect hardware conversion is detected and some macros are defined. Use these macros to decide whether to register hardware conversion in H5T.c. If no hardware conversion function is registered for certain pair of datatypes, software conversion function will be used as the conversion path. Although slower than hardware conversion, we're more confident software conversion is accurate. So in one sentence to describe library's behavior, if some hardware conversion doesn't work well, software conversion will be used instead. Platforms tested: h5committest and fuss. Misc. update: some changes to configure's comments.
Diffstat (limited to 'test')
-rw-r--r--test/dsets.c1
-rw-r--r--test/dtypes.c8
2 files changed, 5 insertions, 4 deletions
diff --git a/test/dsets.c b/test/dsets.c
index da5c5d5..8646485 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -5122,6 +5122,7 @@ int main(void)
nerrors += test_missing_chunk(file)<0 ?1:0;
if (H5Fclose(file)<0) goto error;
+
if (nerrors) goto error;
printf("All dataset tests passed.\n");
h5_cleanup(FILENAME, fapl);
diff --git a/test/dtypes.c b/test/dtypes.c
index f5bfb3c..bf99433 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -7396,11 +7396,11 @@ run_float_int_conv(const char *name)
#if H5_SIZEOF_LONG_LONG!=H5_SIZEOF_LONG
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
+ * .NET should define this macro H5_HW_FP_TO_LLONG_NOT_WORKS. */
+#ifndef H5_HW_FP_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*/
+#endif /*H5_HW_FP_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);
@@ -7999,7 +7999,7 @@ main(void)
/* Test software integer-float conversion functions */
nerrors += run_int_float_conv("sw");
-
+
reset_hdf5();
if (nerrors) {