From b39322d52d2dd66d37af0ffcbfb48d13896804ea Mon Sep 17 00:00:00 2001 From: ngie Date: Fri, 10 Feb 2017 07:13:16 +0000 Subject: MFC r311925,r311968,r311969,r312008: r311925: Import testcase updates with code contributed back to NetBSD This also (inadvertently) contains an update to contrib/netbsd-tests/lib/libc/sys/t_wait.c (new testcases). In collaboration with: christos@NetBSD.org r311968: Fix lib/libc/sys/access_test after r311925 sys/param.h needs to be #included in order for __FreeBSD_version to be checked r311969: Remove __HAVE_LONG_DOUBLE #define from t_strtod.c and place it in Makefile This is to enable support in other testcases Inspired by lib/msun/tests/Makefile . r312008: Upgrade NetBSD tests to 01.11.2017_23.20 snapshot This contains some new testcases in /usr/tests/...: - .../lib/libc - .../lib/libthr - .../lib/msun - .../sys/kern Tested on: amd64, i386 --- contrib/netbsd-tests/lib/libm/t_ldexp.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'contrib/netbsd-tests/lib/libm/t_ldexp.c') diff --git a/contrib/netbsd-tests/lib/libm/t_ldexp.c b/contrib/netbsd-tests/lib/libm/t_ldexp.c index eaf8a4b..251f2ae 100644 --- a/contrib/netbsd-tests/lib/libm/t_ldexp.c +++ b/contrib/netbsd-tests/lib/libm/t_ldexp.c @@ -1,4 +1,4 @@ -/* $NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $ */ +/* $NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $ */ /*- * Copyright (c) 2011 The NetBSD Foundation, Inc. @@ -29,7 +29,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ #include -__RCSID("$NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $"); +__RCSID("$NetBSD: t_ldexp.c,v 1.16 2016/08/25 00:32:31 maya Exp $"); #include @@ -96,10 +96,12 @@ struct ldexp_test ldexp_overflow[] = { { 1.0, 1023, 1, " inf" }, { 1.0, -1022, 2046, " inf" }, { 1.0, 1025, SKIP, " inf" }, + { 2.0, INT_MAX,SKIP, " inf" }, { -1.0, 1024, SKIP, " -inf" }, { -1.0, 1023, 1, " -inf" }, { -1.0, -1022, 2046, " -inf" }, { -1.0, 1025, SKIP, " -inf" }, + { -2.0, INT_MAX,SKIP, " -inf" }, { 0, 0, 0, NULL } }; @@ -170,10 +172,8 @@ run_test(struct ldexp_test *table) v = ldexp(table->x, table->exp1); - if (table->exp2 == SKIP) - continue; - - v = ldexp(v, table->exp2); + if (table->exp2 != SKIP) + v = ldexp(v, table->exp2); (void)snprintf(outbuf, sizeof(outbuf), FORMAT, v); -- cgit v1.1