7 test (const char str[])
14 double d = strtod (str, &endp);
17 puts ("strtod did not return NAN");
22 puts ("strtod returned a sNAN");
25 if (strcmp (endp, "something") != 0)
27 puts ("strtod set incorrect end pointer");
31 float f = strtof (str, &endp);
34 puts ("strtof did not return NAN");
39 puts ("strtof returned a sNAN");
42 if (strcmp (endp, "something") != 0)
44 puts ("strtof set incorrect end pointer");
48 long double ld = strtold (str, &endp);
51 puts ("strtold did not return NAN");
56 puts ("strtold returned a sNAN");
59 if (strcmp (endp, "something") != 0)
61 puts ("strtold set incorrect end pointer");
73 result |= test ("NaN(blabla)something");
74 result |= test ("NaN(1234)something");
76 result |= test ("NaN(4294967295)something");
78 result |= test ("NaN(18446744073709551615)something");
79 /* The case of zero is special in that "something" has to be done to make the
80 mantissa different from zero, which would mean infinity instead of
82 result |= test ("NaN(0)something");
87 #define TEST_FUNCTION do_test ()
88 #include "../test-skeleton.c"