Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/lib/libm fix long double
details: https://anonhg.NetBSD.org/src/rev/cd4a3f19b4fd
branches: trunk
changeset: 347398:cd4a3f19b4fd
user: christos <christos%NetBSD.org@localhost>
date: Wed Aug 24 09:13:44 2016 +0000
description:
fix long double
diffstat:
tests/lib/libm/t_ilogb.c | 12 +++++++++++-
1 files changed, 11 insertions(+), 1 deletions(-)
diffs (58 lines):
diff -r c075a6a7a319 -r cd4a3f19b4fd tests/lib/libm/t_ilogb.c
--- a/tests/lib/libm/t_ilogb.c Wed Aug 24 09:10:57 2016 +0000
+++ b/tests/lib/libm/t_ilogb.c Wed Aug 24 09:13:44 2016 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: t_ilogb.c,v 1.3 2016/08/23 10:03:44 christos Exp $ */
+/* $NetBSD: t_ilogb.c,v 1.4 2016/08/24 09:13:44 christos Exp $ */
/*-
* Copyright (c) 2016 The NetBSD Foundation, Inc.
@@ -73,38 +73,48 @@
ATF_CHECK_RAISED_INVALID;
ATF_CHECK(ilogb(-0) == FP_ILOGB0);
ATF_CHECK_RAISED_INVALID;
+#ifdef __HAVE_LONG_DOUBLE
ATF_CHECK(ilogbl(-0) == FP_ILOGB0);
ATF_CHECK_RAISED_INVALID;
+#endif
ATF_CHECK(ilogbf(INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
ATF_CHECK(ilogb(INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
+#ifdef __HAVE_LONG_DOUBLE
ATF_CHECK(ilogbl(INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
+#endif
ATF_CHECK(ilogbf(-INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
ATF_CHECK(ilogb(-INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
+#ifdef __HAVE_LONG_DOUBLE
ATF_CHECK(ilogbl(-INFINITY) == INT_MAX);
ATF_CHECK_RAISED_INVALID;
+#endif
ATF_CHECK(ilogbf(1024) == 10);
ATF_CHECK_RAISED_NOTHING;
ATF_CHECK(ilogb(1024) == 10);
ATF_CHECK_RAISED_NOTHING;
+#ifdef __HAVE_LONG_DOUBLE
ATF_CHECK(ilogbl(1024) == 10);
ATF_CHECK_RAISED_NOTHING;
+#endif
#ifndef __vax__
ATF_CHECK(ilogbf(NAN) == FP_ILOGBNAN);
ATF_CHECK_RAISED_INVALID;
ATF_CHECK(ilogb(NAN) == FP_ILOGBNAN);
ATF_CHECK_RAISED_INVALID;
+#ifdef __HAVE_LONG_DOUBLE
ATF_CHECK(ilogbl(NAN) == FP_ILOGBNAN);
ATF_CHECK_RAISED_INVALID;
#endif
+#endif
}
ATF_TP_ADD_TCS(tp)
Home |
Main Index |
Thread Index |
Old Index