6 static const char *tests[] =
8 "inf", "Inf", "iNf", "inF", "INf", "iNF", "INF", "InF",
9 "infinity", "Infinity", "InfInity", "INFINITY"
11 #define ntests (sizeof (tests) / sizeof (tests[0]))
16 /* The Turkish locale is notorious because tolower() maps 'I' to the
17 dotless lowercase 'i' and toupper() maps 'i' to an 'I' with a dot
19 if (setlocale (LC_ALL, "tr_TR.UTF-8") == NULL)
21 puts ("cannot set locale");
26 for (int i = 0; i < ntests; ++i)
29 double d = strtod (tests[i], &endp);
32 printf ("did not consume all of '%s'\n", tests[i]);
37 printf ("'%s' does not pass isinf\n", tests[i]);
45 #define TEST_FUNCTION do_test ()
46 #include "../test-skeleton.c"