6 #define NNBSP "\xe2\x80\xaf"
15 { "000"NNBSP
"000"NNBSP
"000", "", 0.0 },
16 { "1"NNBSP
"000"NNBSP
"000,5x", "x", 1000000.5 },
18 { "10"NNBSP NNBSP
"200", NNBSP NNBSP
"200", 10.0 }
20 #define NTESTS (sizeof (tests) / sizeof (tests[0]))
26 if (setlocale (LC_ALL
, "cs_CZ.UTF-8") == NULL
)
28 puts ("could not set locale");
34 for (int i
= 0; i
< NTESTS
; ++i
)
37 double r
= __strtod_internal (tests
[i
].in
, &ep
, 1);
39 if (strcmp (ep
, tests
[i
].out
) != 0)
41 printf ("%d: got rest string \"%s\", expected \"%s\"\n",
46 if (r
!= tests
[i
].expected
)
48 printf ("%d: got wrong results %g, expected %g\n",
49 i
, r
, tests
[i
].expected
);
57 #define TEST_FUNCTION do_test ()
58 #include "../test-skeleton.c"