Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
55d51b1a
Commit
55d51b1a
authored
Jun 08, 2020
by
Piotr Caban
Committed by
Alexandre Julliard
Jun 08, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ucrtbase: Add more inf,nan,ind printf tests.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
e30b853e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
71 additions
and
1 deletion
+71
-1
printf.c
dlls/ucrtbase/tests/printf.c
+71
-1
No files found.
dlls/ucrtbase/tests/printf.c
View file @
55d51b1a
...
...
@@ -657,11 +657,81 @@ static void test_printf_fp(void)
_CRT_INTERNAL_PRINTF_LEGACY_MSVCRT_COMPATIBILITY
|
_CRT_INTERNAL_PRINTF_LEGACY_THREE_DIGIT_EXPONENTS
};
static
const
struct
{
const
struct
{
const
char
*
fmt
;
double
d
;
const
char
*
res
[
ARRAY_SIZE
(
flags
)];
}
tests
[]
=
{
{
"%a"
,
NAN
,
{
"nan"
,
"0x1.#QNAN00000000p+0"
,
"nan"
,
"0x1.#QNAN00000000p+0"
}},
{
"%A"
,
NAN
,
{
"NAN"
,
"0X1.#QNAN00000000P+0"
,
"NAN"
,
"0X1.#QNAN00000000P+0"
}},
{
"%e"
,
NAN
,
{
"nan"
,
"1.#QNAN0e+00"
,
"nan"
,
"1.#QNAN0e+000"
}},
{
"%E"
,
NAN
,
{
"NAN"
,
"1.#QNAN0E+00"
,
"NAN"
,
"1.#QNAN0E+000"
}},
{
"%g"
,
NAN
,
{
"nan"
,
"1.#QNAN"
,
"nan"
,
"1.#QNAN"
}},
{
"%G"
,
NAN
,
{
"NAN"
,
"1.#QNAN"
,
"NAN"
,
"1.#QNAN"
}},
{
"%21a"
,
NAN
,
{
" nan"
,
" 0x1.#QNAN00000000p+0"
,
" nan"
,
" 0x1.#QNAN00000000p+0"
}},
{
"%20e"
,
NAN
,
{
" nan"
,
" 1.#QNAN0e+00"
,
" nan"
,
" 1.#QNAN0e+000"
}},
{
"%20g"
,
NAN
,
{
" nan"
,
" 1.#QNAN"
,
" nan"
,
" 1.#QNAN"
}},
{
"%.21a"
,
NAN
,
{
"nan"
,
"0x1.#QNAN0000000000000000p+0"
,
"nan"
,
"0x1.#QNAN0000000000000000p+0"
}},
{
"%.20e"
,
NAN
,
{
"nan"
,
"1.#QNAN000000000000000e+00"
,
"nan"
,
"1.#QNAN000000000000000e+000"
}},
{
"%.20g"
,
NAN
,
{
"nan"
,
"1.#QNAN"
,
"nan"
,
"1.#QNAN"
}},
{
"%.021a"
,
NAN
,
{
"nan"
,
"0x1.#QNAN0000000000000000p+0"
,
"nan"
,
"0x1.#QNAN0000000000000000p+0"
}},
{
"%.020e"
,
NAN
,
{
"nan"
,
"1.#QNAN000000000000000e+00"
,
"nan"
,
"1.#QNAN000000000000000e+000"
}},
{
"%.020g"
,
NAN
,
{
"nan"
,
"1.#QNAN"
,
"nan"
,
"1.#QNAN"
}},
{
"%#.21a"
,
NAN
,
{
"nan"
,
"0x1.#QNAN0000000000000000p+0"
,
"nan"
,
"0x1.#QNAN0000000000000000p+0"
}},
{
"%#.20e"
,
NAN
,
{
"nan"
,
"1.#QNAN000000000000000e+00"
,
"nan"
,
"1.#QNAN000000000000000e+000"
}},
{
"%#.20g"
,
NAN
,
{
"nan"
,
"1.#QNAN00000000000000"
,
"nan"
,
"1.#QNAN00000000000000"
}},
{
"%.1g"
,
NAN
,
{
"nan"
,
"1"
,
"nan"
,
"1"
}},
{
"%.2g"
,
NAN
,
{
"nan"
,
"1.$"
,
"nan"
,
"1.$"
}},
{
"%.3g"
,
NAN
,
{
"nan"
,
"1.#R"
,
"nan"
,
"1.#R"
}},
{
"%a"
,
IND
,
{
"-nan(ind)"
,
"-0x1.#IND000000000p+0"
,
"-nan(ind)"
,
"-0x1.#IND000000000p+0"
}},
{
"%e"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND00e+00"
,
"-nan(ind)"
,
"-1.#IND00e+000"
}},
{
"%g"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND"
,
"-nan(ind)"
,
"-1.#IND"
}},
{
"%21a"
,
IND
,
{
" -nan(ind)"
,
"-0x1.#IND000000000p+0"
,
" -nan(ind)"
,
"-0x1.#IND000000000p+0"
}},
{
"%20e"
,
IND
,
{
" -nan(ind)"
,
" -1.#IND00e+00"
,
" -nan(ind)"
,
" -1.#IND00e+000"
}},
{
"%20g"
,
IND
,
{
" -nan(ind)"
,
" -1.#IND"
,
" -nan(ind)"
,
" -1.#IND"
}},
{
"%.21a"
,
IND
,
{
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
,
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
}},
{
"%.20e"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND0000000000000000e+00"
,
"-nan(ind)"
,
"-1.#IND0000000000000000e+000"
}},
{
"%.20g"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND"
,
"-nan(ind)"
,
"-1.#IND"
}},
{
"%.021a"
,
IND
,
{
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
,
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
}},
{
"%.020e"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND0000000000000000e+00"
,
"-nan(ind)"
,
"-1.#IND0000000000000000e+000"
}},
{
"%.020g"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND"
,
"-nan(ind)"
,
"-1.#IND"
}},
{
"%#.21a"
,
IND
,
{
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
,
"-nan(ind)"
,
"-0x1.#IND00000000000000000p+0"
}},
{
"%#.20e"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND0000000000000000e+00"
,
"-nan(ind)"
,
"-1.#IND0000000000000000e+000"
}},
{
"%#.20g"
,
IND
,
{
"-nan(ind)"
,
"-1.#IND000000000000000"
,
"-nan(ind)"
,
"-1.#IND000000000000000"
}},
{
"%a"
,
INFINITY
,
{
"inf"
,
"0x1.#INF000000000p+0"
,
"inf"
,
"0x1.#INF000000000p+0"
}},
{
"%e"
,
INFINITY
,
{
"inf"
,
"1.#INF00e+00"
,
"inf"
,
"1.#INF00e+000"
}},
{
"%g"
,
INFINITY
,
{
"inf"
,
"1.#INF"
,
"inf"
,
"1.#INF"
}},
{
"%21a"
,
INFINITY
,
{
" inf"
,
" 0x1.#INF000000000p+0"
,
" inf"
,
" 0x1.#INF000000000p+0"
}},
{
"%20e"
,
INFINITY
,
{
" inf"
,
" 1.#INF00e+00"
,
" inf"
,
" 1.#INF00e+000"
}},
{
"%20g"
,
INFINITY
,
{
" inf"
,
" 1.#INF"
,
" inf"
,
" 1.#INF"
}},
{
"%.21a"
,
INFINITY
,
{
"inf"
,
"0x1.#INF00000000000000000p+0"
,
"inf"
,
"0x1.#INF00000000000000000p+0"
}},
{
"%.20e"
,
INFINITY
,
{
"inf"
,
"1.#INF0000000000000000e+00"
,
"inf"
,
"1.#INF0000000000000000e+000"
}},
{
"%.20g"
,
INFINITY
,
{
"inf"
,
"1.#INF"
,
"inf"
,
"1.#INF"
}},
{
"%.021a"
,
INFINITY
,
{
"inf"
,
"0x1.#INF00000000000000000p+0"
,
"inf"
,
"0x1.#INF00000000000000000p+0"
}},
{
"%.020e"
,
INFINITY
,
{
"inf"
,
"1.#INF0000000000000000e+00"
,
"inf"
,
"1.#INF0000000000000000e+000"
}},
{
"%.020g"
,
INFINITY
,
{
"inf"
,
"1.#INF"
,
"inf"
,
"1.#INF"
}},
{
"%#.21a"
,
INFINITY
,
{
"inf"
,
"0x1.#INF00000000000000000p+0"
,
"inf"
,
"0x1.#INF00000000000000000p+0"
}},
{
"%#.20e"
,
INFINITY
,
{
"inf"
,
"1.#INF0000000000000000e+00"
,
"inf"
,
"1.#INF0000000000000000e+000"
}},
{
"%#.20g"
,
INFINITY
,
{
"inf"
,
"1.#INF000000000000000"
,
"inf"
,
"1.#INF000000000000000"
}},
{
"%a"
,
-
INFINITY
,
{
"-inf"
,
"-0x1.#INF000000000p+0"
,
"-inf"
,
"-0x1.#INF000000000p+0"
}},
{
"%e"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF00e+00"
,
"-inf"
,
"-1.#INF00e+000"
}},
{
"%g"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF"
,
"-inf"
,
"-1.#INF"
}},
{
"%21a"
,
-
INFINITY
,
{
" -inf"
,
"-0x1.#INF000000000p+0"
,
" -inf"
,
"-0x1.#INF000000000p+0"
}},
{
"%20e"
,
-
INFINITY
,
{
" -inf"
,
" -1.#INF00e+00"
,
" -inf"
,
" -1.#INF00e+000"
}},
{
"%20g"
,
-
INFINITY
,
{
" -inf"
,
" -1.#INF"
,
" -inf"
,
" -1.#INF"
}},
{
"%.21a"
,
-
INFINITY
,
{
"-inf"
,
"-0x1.#INF00000000000000000p+0"
,
"-inf"
,
"-0x1.#INF00000000000000000p+0"
}},
{
"%.20e"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF0000000000000000e+00"
,
"-inf"
,
"-1.#INF0000000000000000e+000"
}},
{
"%.20g"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF"
,
"-inf"
,
"-1.#INF"
}},
{
"%.021a"
,
-
INFINITY
,
{
"-inf"
,
"-0x1.#INF00000000000000000p+0"
,
"-inf"
,
"-0x1.#INF00000000000000000p+0"
}},
{
"%.020e"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF0000000000000000e+00"
,
"-inf"
,
"-1.#INF0000000000000000e+000"
}},
{
"%.020g"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF"
,
"-inf"
,
"-1.#INF"
}},
{
"%#.21a"
,
-
INFINITY
,
{
"-inf"
,
"-0x1.#INF00000000000000000p+0"
,
"-inf"
,
"-0x1.#INF00000000000000000p+0"
}},
{
"%#.20e"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF0000000000000000e+00"
,
"-inf"
,
"-1.#INF0000000000000000e+000"
}},
{
"%#.20g"
,
-
INFINITY
,
{
"-inf"
,
"-1.#INF000000000000000"
,
"-inf"
,
"-1.#INF000000000000000"
}},
{
"%a"
,
0
,
{
"0x0.0000000000000p+0"
}},
{
"%A"
,
0
,
{
"0X0.0000000000000P+0"
}},
{
"%a"
,
0
.
5
,
{
"0x1.0000000000000p-1"
}},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment