6 #include "tst-strtod.h"
8 #define TEST_STRTOD(FSUF, FTYPE, FTOSTR, LSUF, CSUF) \
10 test_strto ## FSUF (const char str[]) \
15 FTYPE d = strto ## FSUF (str, &endp); \
18 puts ("strto" #FSUF " did not return NAN"); \
21 if (issignaling (d)) \
23 puts ("strto" #FSUF " returned a sNAN"); \
26 if (strcmp (endp, "something") != 0) \
28 puts ("strto" #FSUF " set incorrect end pointer"); \
34 GEN_TEST_STRTOD_FOREACH (TEST_STRTOD
);
41 result
|= STRTOD_TEST_FOREACH (test_strto
, "NaN(blabla)something");
42 result
|= STRTOD_TEST_FOREACH (test_strto
, "NaN(1234)something");
44 result
|= STRTOD_TEST_FOREACH (test_strto
, "NaN(4294967295)something");
46 result
|= STRTOD_TEST_FOREACH (test_strto
,
47 "NaN(18446744073709551615)something");
48 /* The case of zero is special in that "something" has to be done to make the
49 mantissa different from zero, which would mean infinity instead of
51 result
|= STRTOD_TEST_FOREACH (test_strto
, "NaN(0)something");
56 #define TEST_FUNCTION do_test ()
57 #include "../test-skeleton.c"