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
92014581
Commit
92014581
authored
Feb 19, 2020
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Feb 19, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user32/tests: Use wide string literals in wsprintf tests.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
22e58b11
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
18 deletions
+12
-18
wsprintf.c
dlls/user32/tests/wsprintf.c
+12
-18
No files found.
dlls/user32/tests/wsprintf.c
View file @
92014581
...
...
@@ -53,9 +53,9 @@ static const struct
static
void
wsprintfATest
(
void
)
{
char
buf
[
25
],
star
[
4
],
partial
[
4
];
static
const
WCHAR
starW
[]
=
{
0x2606
,
0
}
;
static
const
WCHAR
fffeW
[]
=
{
0xfffe
,
0
}
;
static
const
WCHAR
wineW
[]
=
{
0xd83c
,
0xdf77
,
0
}
;
/* U+1F377: wine glass */
static
const
WCHAR
starW
[]
=
L"
\x2606
"
;
static
const
WCHAR
fffeW
[]
=
L"
\xfffe
"
;
static
const
WCHAR
wineW
[]
=
L"
\xd83c\xdf77
"
;
/* U+1F377: wine glass */
const
struct
{
const
void
*
input
;
const
char
*
fmt
;
...
...
@@ -120,14 +120,8 @@ static void wsprintfATest(void)
static
void
wsprintfWTest
(
void
)
{
static
const
WCHAR
fmt_010ld
[]
=
{
'%'
,
'0'
,
'1'
,
'0'
,
'l'
,
'd'
,
'\0'
};
static
const
WCHAR
res_010ld
[]
=
{
'-'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'0'
,
'1'
,
'\0'
};
static
const
WCHAR
fmt_I64x
[]
=
{
'%'
,
'I'
,
'6'
,
'4'
,
'x'
,
0
};
static
const
WCHAR
fmt_dot3S
[]
=
{
'%'
,
'.'
,
'3'
,
'S'
,
0
};
static
const
WCHAR
fmt__4S
[]
=
{
'%'
,
'-'
,
'4'
,
'S'
,
0
};
static
const
WCHAR
stars
[]
=
{
'*'
,
0x2606
,
0x2605
,
0
};
static
const
WCHAR
nul_spc
[]
=
{
'*'
,
0
,
' '
,
' '
,
0
};
WCHAR
def_spc
[]
=
{
'*'
,
'?'
,
0x2605
,
' '
,
0
};
static
const
WCHAR
stars
[]
=
L"*
\x2606\x2605
"
;
WCHAR
def_spc
[]
=
L"*?
\x2605
"
;
WCHAR
buf
[
25
],
fmt
[
25
],
res
[
25
];
char
stars_mb
[
8
],
partial00
[
8
],
partialFF
[
8
];
const
struct
{
...
...
@@ -137,25 +131,25 @@ static void wsprintfWTest(void)
int
rc
;
}
testcase
[]
=
{
{
stars_mb
,
fmt_dot3S
,
stars
,
3
},
{
partial00
,
fmt__4S
,
nul_spc
,
4
},
{
partialFF
,
fmt__4S
,
def_spc
,
4
},
{
stars_mb
,
L"%.3S"
,
stars
,
3
},
{
partial00
,
L"%-4S"
,
L"*
\0
"
,
4
},
{
partialFF
,
L"%-4S"
,
def_spc
,
4
},
};
CPINFOEXW
cpinfoex
;
unsigned
int
i
;
int
rc
;
rc
=
wsprintfW
(
buf
,
fmt_010ld
,
-
1
);
rc
=
wsprintfW
(
buf
,
L"%010ld"
,
-
1
);
if
(
rc
==
0
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
win_skip
(
"wsprintfW is not implemented
\n
"
);
return
;
}
ok
(
rc
==
10
,
"wsPrintfW length failure: rc=%d error=%d
\n
"
,
rc
,
GetLastError
());
ok
((
lstrcmpW
(
buf
,
res_010ld
)
==
0
),
ok
((
lstrcmpW
(
buf
,
L"-000000001"
)
==
0
),
"wsprintfW zero padded negative value failure
\n
"
);
rc
=
wsprintfW
(
buf
,
fmt_I64x
,
(
ULONGLONG
)
0
);
if
(
rc
==
4
&&
!
lstrcmpW
(
buf
,
fmt_I64x
+
1
))
rc
=
wsprintfW
(
buf
,
L"%I64x"
,
(
ULONGLONG
)
0
);
if
(
rc
==
4
&&
!
lstrcmpW
(
buf
,
L"I64x"
))
{
win_skip
(
"I64 formats not supported
\n
"
);
return
;
...
...
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