summaryrefslogtreecommitdiffstats
path: root/test/hyperslab.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/hyperslab.c')
-rw-r--r--test/hyperslab.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/hyperslab.c b/test/hyperslab.c
index 0a46faf..16bd1bb 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -663,7 +663,11 @@ test_multifill(size_t nx)
for (i = 0; i < nx; i++) {
if (dst[i].left != 3333333) {
sprintf(s, "bad dst[%lu].left", (unsigned long)i);
- } else if (dst[i].mid != fill.mid) {
+ } else if (!DBL_ABS_EQUAL(dst[i].mid, fill.mid)) {
+ /* Check if two DOUBLE values are equal. If their difference
+ * is smaller than the EPSILON value for double, they are
+ * considered equal. See the definition in h5test.h.
+ */
sprintf(s, "bad dst[%lu].mid", (unsigned long)i);
} else if (dst[i].right != 4444444) {
sprintf(s, "bad dst[%lu].right", (unsigned long)i);