Module Name:    src
Committed By:   matt
Date:           Fri Mar 23 23:45:31 UTC 2012

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

Log Message:
If one of the tests with eps fails, print the failing eps.


To generate a diff of this commit:
cvs rdiff -u -r1.2 -r1.3 src/tests/lib/libm/t_acos.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_acos.c
diff -u src/tests/lib/libm/t_acos.c:1.2 src/tests/lib/libm/t_acos.c:1.3
--- src/tests/lib/libm/t_acos.c:1.2	Sun Sep 18 04:48:38 2011
+++ src/tests/lib/libm/t_acos.c	Fri Mar 23 23:45:31 2012
@@ -1,4 +1,4 @@
-/* $NetBSD: t_acos.c,v 1.2 2011/09/18 04:48:38 jruoho Exp $ */
+/* $NetBSD: t_acos.c,v 1.3 2012/03/23 23:45:31 matt Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -138,8 +138,9 @@ ATF_TC_BODY(acos_cos, tc)
 		y = acos(cos(x[i]));
 
 		if (fabs(y - x[i]) > eps)
-			atf_tc_fail_nonfatal("acos(cos(%0.03f)) != %0.03f",
-			    x[i], x[i]);
+			atf_tc_fail_nonfatal(
+			    "acos(cos(%0.03f)) != %0.03f (eps=%0.03e)",
+			    x[i], x[i], fabs(y - x[i]));
 	}
 #endif
 }
@@ -250,8 +251,9 @@ ATF_TC_BODY(acosf_cosf, tc)
 		y = acosf(cosf(x[i]));
 
 		if (fabsf(y - x[i]) > eps)
-			atf_tc_fail_nonfatal("acosf(cosf(%0.03f)) != %0.03f",
-			    x[i], x[i]);
+			atf_tc_fail_nonfatal(
+			    "acosf(cosf(%0.03f)) != %0.03f (eps=%0.03e)",
+			    x[i], x[i], fabs(y - x[i]));
 	}
 #endif
 }

Reply via email to