1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-07-29 11:41:21 +03:00

Refactor strtod tests

This patch changes strtod* tests to use strfrom* functions.
This commit is contained in:
Rajalakshmi Srinivasaraghavan
2016-08-30 11:43:21 +05:30
committed by Gabriel F. T. Gomes
parent 6962682ffe
commit bf5eea32ac
6 changed files with 27 additions and 22 deletions

View File

@ -23,7 +23,7 @@
#include "tst-strtod.h"
#define TEST_STRTOD(FSUF, FTYPE, FTOSTR, FTOSTRM, LSUF, CSUF) \
#define TEST_STRTOD(FSUF, FTYPE, FTOSTR, LSUF, CSUF) \
static int \
test_strto ## FSUF (void) \
{ \
@ -45,8 +45,8 @@ test_strto ## FSUF (void) \
{ \
char fstr[FSTRLENMAX]; \
char fcntstr[FSTRLENMAX]; \
FTOSTR (fstr, sizeof (fstr), "%" FTOSTRM "g", f); \
FTOSTR (fcntstr, sizeof (fstr), "%" FTOSTRM "g", (FTYPE) cnt); \
FTOSTR (fstr, sizeof (fstr), "%g", f); \
FTOSTR (fcntstr, sizeof (fstr), "%g", (FTYPE) cnt); \
printf ("strto" #FSUF "(\"%s\") " \
"failed for cnt == %d (%s instead of %s)\n", \
buf, cnt, fstr, fcntstr); \