Source-Changes-HG archive

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

[src/trunk]: src/tests/lib/libm don't skip the entire test iteration if exp2=...



details:   https://anonhg.NetBSD.org/src/rev/e18b529a9f80
branches:  trunk
changeset: 347405:e18b529a9f80
user:      maya <maya%NetBSD.org@localhost>
date:      Thu Aug 25 00:26:01 2016 +0000

description:
don't skip the entire test iteration if exp2=SKIP, only the second
application of the function

this doesn't introduce new failures on amd64

diffstat:

 tests/lib/libm/t_ldexp.c |  10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diffs (31 lines):

diff -r ebcef02f029c -r e18b529a9f80 tests/lib/libm/t_ldexp.c
--- a/tests/lib/libm/t_ldexp.c  Wed Aug 24 22:50:57 2016 +0000
+++ b/tests/lib/libm/t_ldexp.c  Thu Aug 25 00:26:01 2016 +0000
@@ -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.15 2016/08/25 00:26:01 maya Exp $ */
 
 /*-
  * Copyright (c) 2011 The NetBSD Foundation, Inc.
@@ -29,7 +29,7 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 #include <sys/cdefs.h>
-__RCSID("$NetBSD: t_ldexp.c,v 1.14 2014/11/04 00:20:19 justin Exp $");
+__RCSID("$NetBSD: t_ldexp.c,v 1.15 2016/08/25 00:26:01 maya Exp $");
 
 #include <sys/param.h>
 
@@ -170,10 +170,8 @@
 
                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);
 



Home | Main Index | Thread Index | Old Index