Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/lib/libm do the long double tests if we have long double.



details:   https://anonhg.NetBSD.org/src/rev/e13a703e125b
branches:  trunk
changeset: 817618:e13a703e125b
user:      christos <christos%NetBSD.org@localhost>
date:      Sat Aug 27 10:07:05 2016 +0000

description:
do the long double tests if we have long double.

diffstat:

 tests/lib/libm/t_precision.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (44 lines):

diff -r 5aaf20dd09a4 -r e13a703e125b tests/lib/libm/t_precision.c
--- a/tests/lib/libm/t_precision.c      Sat Aug 27 10:03:16 2016 +0000
+++ b/tests/lib/libm/t_precision.c      Sat Aug 27 10:07:05 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $ */
+/* $NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $ */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_precision.c,v 1.2 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_precision.c,v 1.3 2016/08/27 10:07:05 christos Exp $");
 
 #include <atf-c.h>
 
@@ -45,7 +45,9 @@
 }
 
 volatile double x = 1;
+#if __HAVE_LONG_DOUBLE
 volatile long double y = 1;
+#endif
 
 ATF_TC_BODY(t_precision, tc)
 {
@@ -58,6 +60,7 @@
        x += DBL_EPSILON;
        ATF_CHECK(x == 2.0);
 
+#if __HAVE_LONG_DOUBLE
        y += LDBL_EPSILON;
        ATF_CHECK(y != 1.0L);
        y -= 1;
@@ -65,6 +68,7 @@
        y = 2;
        y += LDBL_EPSILON;
        ATF_CHECK(y == 2.0L);
+#endif
 }
 
 ATF_TP_ADD_TCS(tp)



Home | Main Index | Thread Index | Old Index