Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm print what went wrong.
details: https://anonhg.NetBSD.org/src/rev/3aa040b39040
branches: trunk
changeset: 347872:3aa040b39040
user: christos <christos%NetBSD.org@localhost>
date: Tue Sep 20 17:19:28 2016 +0000
description:
print what went wrong.
diffstat:
tests/lib/libm/t_casinh.c | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (32 lines):
diff -r 6fbfd5a00674 -r 3aa040b39040 tests/lib/libm/t_casinh.c
--- a/tests/lib/libm/t_casinh.c Tue Sep 20 15:03:07 2016 +0000
+++ b/tests/lib/libm/t_casinh.c Tue Sep 20 17:19:28 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_casinh.c,v 1.1 2016/08/31 14:05:10 maya Exp $ */
+/* $NetBSD: t_casinh.c,v 1.2 2016/09/20 17:19:28 christos Exp $ */
/*
* Written by Maya Rashish
@@ -44,8 +44,11 @@
#define crude_equality(a,b) ((a == b) || both_nan(a,b))
#define ATF_COMPLEX_EQUAL(a,b) do { \
- ATF_CHECK(crude_equality(creal(a),creal(b)) && \
- crude_equality(cimag(a), cimag(b))); \
+ complex double ci = casinh(a); \
+ ATF_CHECK_MSG(crude_equality(creal(ci),creal(b)) && \
+ crude_equality(cimag(ci), cimag(b)), \
+ "for casinh([%g,%g]) = [%g,%g] != [%g,%g]", \
+ creal(a), cimag(a), creal(ci), cimag(ci), creal(b), cimag(b)); \
} while (0/*CONSTCOND*/)
@@ -65,7 +68,7 @@
IM(input) = values[i].input_im;
RE(result) = values[i].result_re;
IM(result) = values[i].result_im;
- ATF_COMPLEX_EQUAL(casinh(input), result);
+ ATF_COMPLEX_EQUAL(input, result);
}
}
Home |
Main Index |
Thread Index |
Old Index