ucrtbase: Add more printf tests.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1bc6f0c861
commit
d5f1c54950
|
@ -758,6 +758,57 @@ static void test_printf_fp(void)
|
|||
{ "%#.0a", -0.5, { "-0x1.p-1" }},
|
||||
{ "%#.0a", 0.5, { "0x1.p-1" }},
|
||||
{ "%#.0a", 1.5, { "0x1.p+0" }},
|
||||
|
||||
{ "%f", 0, { "0.000000" }},
|
||||
{ "%e", 0, { "0.000000e+00", NULL, "0.000000e+000" }},
|
||||
{ "%g", 0, { "0" }},
|
||||
{ "%21f", 0, { " 0.000000" }},
|
||||
{ "%20e", 0, { " 0.000000e+00", NULL, " 0.000000e+000" }},
|
||||
{ "%20g", 0, { " 0" }},
|
||||
{ "%.21f", 0, { "0.000000000000000000000" }},
|
||||
{ "%.20e", 0, { "0.00000000000000000000e+00", NULL, "0.00000000000000000000e+000" }},
|
||||
{ "%.20g", 0, { "0" }},
|
||||
{ "%.021f", 0, { "0.000000000000000000000" }},
|
||||
{ "%.020e", 0, { "0.00000000000000000000e+00", NULL, "0.00000000000000000000e+000" }},
|
||||
{ "%.020g", 0, { "0" }},
|
||||
{ "%#.21f", 0, { "0.000000000000000000000" }},
|
||||
{ "%#.20e", 0, { "0.00000000000000000000e+00", NULL, "0.00000000000000000000e+000" }},
|
||||
{ "%#.20g", 0, { "0.00000000000000000000" }},
|
||||
|
||||
{ "%f", 123, { "123.000000" }},
|
||||
{ "%e", 123, { "1.230000e+02", NULL, "1.230000e+002" }},
|
||||
{ "%g", 123, { "123" }},
|
||||
{ "%21f", 123, { " 123.000000" }},
|
||||
{ "%20e", 123, { " 1.230000e+02", NULL, " 1.230000e+002" }},
|
||||
{ "%20g", 123, { " 123" }},
|
||||
{ "%.21f", 123, { "123.000000000000000000000" }},
|
||||
{ "%.20e", 123, { "1.23000000000000000000e+02", NULL, "1.23000000000000000000e+002" }},
|
||||
{ "%.20g", 123, { "123" }},
|
||||
{ "%.021f", 123, { "123.000000000000000000000" }},
|
||||
{ "%.020e", 123, { "1.23000000000000000000e+02", NULL, "1.23000000000000000000e+002" }},
|
||||
{ "%.020g", 123, { "123" }},
|
||||
{ "%#.21f", 123, { "123.000000000000000000000" }},
|
||||
{ "%#.20e", 123, { "1.23000000000000000000e+02", NULL, "1.23000000000000000000e+002" }},
|
||||
{ "%#.20g", 123, { "123.00000000000000000" }},
|
||||
|
||||
{ "%f", -765, { "-765.000000" }},
|
||||
{ "%e", -765, { "-7.650000e+02", NULL, "-7.650000e+002" }},
|
||||
{ "%g", -765, { "-765" }},
|
||||
{ "%21f", -765, { " -765.000000" }},
|
||||
{ "%20e", -765, { " -7.650000e+02", NULL, " -7.650000e+002" }},
|
||||
{ "%20g", -765, { " -765" }},
|
||||
{ "%.21f", -765, { "-765.000000000000000000000" }},
|
||||
{ "%.20e", -765, { "-7.65000000000000000000e+02", NULL, "-7.65000000000000000000e+002" }},
|
||||
{ "%.20g", -765, { "-765" }},
|
||||
{ "%.021f", -765, { "-765.000000000000000000000" }},
|
||||
{ "%.020e", -765, { "-7.65000000000000000000e+02", NULL, "-7.65000000000000000000e+002" }},
|
||||
{ "%.020g", -765, { "-765" }},
|
||||
{ "%#.21f", -765, { "-765.000000000000000000000" }},
|
||||
{ "%#.20e", -765, { "-7.65000000000000000000e+02", NULL, "-7.65000000000000000000e+002" }},
|
||||
{ "%#.20g", -765, { "-765.00000000000000000" }},
|
||||
{ "%.30f", 1.0/3.0, { "0.333333333333333314829616256247" }},
|
||||
{ "%.30lf", sqrt(2), { "1.414213562373095145474621858739" }},
|
||||
{ "%.0g", 9.8949714229143402e-05, { "0.0001" }},
|
||||
};
|
||||
|
||||
const char *res = NULL;
|
||||
|
|
Loading…
Reference in New Issue