Module Name:    src
Committed By:   christos
Date:           Tue Sep 20 17:19:29 UTC 2016

Modified Files:
        src/tests/lib/libm: t_casinh.c

Log Message:
print what went wrong.


To generate a diff of this commit:
cvs rdiff -u -r1.1 -r1.2 src/tests/lib/libm/t_casinh.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/tests/lib/libm/t_casinh.c
diff -u src/tests/lib/libm/t_casinh.c:1.1 src/tests/lib/libm/t_casinh.c:1.2
--- src/tests/lib/libm/t_casinh.c:1.1	Wed Aug 31 10:05:10 2016
+++ src/tests/lib/libm/t_casinh.c	Tue Sep 20 13:19:28 2016
@@ -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 @@ static const struct {
 #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 @@ ATF_TC_BODY(casinh, tc)
 		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);
 	}
 }
 

Reply via email to