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
3798c0c4
Commit
3798c0c4
authored
Nov 01, 2019
by
Piotr Caban
Committed by
Alexandre Julliard
Nov 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvcrt: Move more printf tests to table.
Signed-off-by:
Piotr Caban
<
piotr@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c2b6dcb0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
25 deletions
+10
-25
printf.c
dlls/msvcrt/tests/printf.c
+10
-25
No files found.
dlls/msvcrt/tests/printf.c
View file @
3798c0c4
...
...
@@ -242,6 +242,8 @@ static void test_sprintf( void )
{
"%C"
,
"a"
,
0
,
INT_ARG
,
'a'
},
{
"%C"
,
""
,
0
,
INT_ARG
,
0x3042
},
{
"a%Cb"
,
"ab"
,
0
,
INT_ARG
,
0x3042
},
{
"%lld"
,
"-8589934591"
,
"1"
,
ULONGLONG_ARG
,
0
,
((
ULONGLONG
)
0xffffffff
)
*
0xffffffff
},
{
"%I32d"
,
"1"
,
"I32d"
,
INT_ARG
,
1
}
};
char
buffer
[
100
];
...
...
@@ -278,19 +280,6 @@ static void test_sprintf( void )
}
}
r
=
p_sprintf
(
buffer
,
"%lld"
,
((
ULONGLONG
)
0xffffffff
)
*
0xffffffff
);
ok
(
r
==
1
||
r
==
11
,
"return count wrong %d
\n
"
,
r
);
if
(
r
==
11
)
/* %ll works on Vista */
ok
(
!
strcmp
(
buffer
,
"-8589934591"
),
"Problem with
\"
ll
\"
interpretation '%s'
\n
"
,
buffer
);
else
ok
(
!
strcmp
(
buffer
,
"1"
),
"Problem with
\"
ll
\"
interpretation '%s'
\n
"
,
buffer
);
r
=
p_sprintf
(
buffer
,
"%I32d"
,
1
);
if
(
r
==
1
)
ok
(
!
strcmp
(
buffer
,
"1"
),
"I32d failed, got '%s'
\n
"
,
buffer
);
else
ok
(
r
==
4
&&
!
strcmp
(
buffer
,
"I32d"
),
"I32d failed, got '%s',%d
\n
"
,
buffer
,
r
);
if
(
sizeof
(
void
*
)
==
8
)
{
r
=
p_sprintf
(
buffer
,
"%p"
,
(
void
*
)
57
);
...
...
@@ -316,6 +305,10 @@ static void test_sprintf( void )
r
=
p_sprintf
(
buffer
,
"%Ix %d"
,
(
size_t
)
0x12345678123456
,
1
);
ok
(
!
strcmp
(
buffer
,
"12345678123456 1"
),
"buffer = %s
\n
"
,
buffer
);
ok
(
r
==
16
,
"return count wrong
\n
"
);
r
=
p_sprintf
(
buffer
,
"%p"
,
0
);
ok
(
!
strcmp
(
buffer
,
"0000000000000000"
),
"failed
\n
"
);
ok
(
r
==
16
,
"return count wrong
\n
"
);
}
else
{
...
...
@@ -342,6 +335,10 @@ static void test_sprintf( void )
r
=
p_sprintf
(
buffer
,
"%Ix %d"
,
0x123456
,
1
);
ok
(
!
strcmp
(
buffer
,
"123456 1"
),
"buffer = %s
\n
"
,
buffer
);
ok
(
r
==
8
,
"return count wrong
\n
"
);
r
=
p_sprintf
(
buffer
,
"%p"
,
0
);
ok
(
!
strcmp
(
buffer
,
"00000000"
),
"failed
\n
"
);
ok
(
r
==
8
,
"return count wrong
\n
"
);
}
r
=
p_sprintf
(
buffer
,
"%.*s"
,
1
,
"foo"
);
...
...
@@ -367,18 +364,6 @@ static void test_sprintf( void )
ok
(
r
==
4
,
"return count wrong: %d
\n
"
,
r
);
}
r
=
p_sprintf
(
buffer
,
"%p"
,
0
);
if
(
sizeof
(
void
*
)
==
8
)
{
ok
(
!
strcmp
(
buffer
,
"0000000000000000"
),
"failed
\n
"
);
ok
(
r
==
16
,
"return count wrong
\n
"
);
}
else
{
ok
(
!
strcmp
(
buffer
,
"00000000"
),
"failed
\n
"
);
ok
(
r
==
8
,
"return count wrong
\n
"
);
}
r
=
p_sprintf
(
buffer
,
"%S"
,
L"
\x3042
"
);
ok
(
r
==-
1
||
broken
(
!
r
),
"r = %d
\n
"
,
r
);
...
...
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