Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
3bb92d77
Commit
3bb92d77
authored
Dec 16, 2019
by
Akihiro Sagawa
Committed by
Alexandre Julliard
Dec 16, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Refactor MB_ERR_INVALID_CHARS tests.
Signed-off-by:
Akihiro Sagawa
<
sagawa.aki@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
6127c688
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
codepage.c
dlls/kernel32/tests/codepage.c
+10
-10
No files found.
dlls/kernel32/tests/codepage.c
View file @
3bb92d77
...
...
@@ -1001,7 +1001,7 @@ static void test_utf7_decoding(void)
static
void
test_undefined_byte_char
(
void
)
{
static
const
struct
tag_testset
{
INT
codepage
;
U
INT
codepage
;
LPCSTR
str
;
BOOL
is_error
;
}
testset
[]
=
{
...
...
@@ -1017,6 +1017,7 @@ static void test_undefined_byte_char(void)
{
1257
,
"
\xa5
"
,
TRUE
},
};
INT
i
,
ret
;
DWORD
err
;
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
testset
);
i
++
)
{
if
(
!
IsValidCodePage
(
testset
[
i
].
codepage
))
...
...
@@ -1028,23 +1029,22 @@ static void test_undefined_byte_char(void)
SetLastError
(
0xdeadbeef
);
ret
=
MultiByteToWideChar
(
testset
[
i
].
codepage
,
MB_ERR_INVALID_CHARS
,
testset
[
i
].
str
,
-
1
,
NULL
,
0
);
err
=
GetLastError
();
if
(
testset
[
i
].
is_error
)
{
ok
(
ret
==
0
&&
GetLastError
()
==
ERROR_NO_UNICODE_TRANSLATION
,
"ret is %d, GetLastError is %u (cp %d)
\n
"
,
ret
,
GetLastError
(),
testset
[
i
].
codepage
);
ok
(
err
==
ERROR_NO_UNICODE_TRANSLATION
,
"Test %u: err is %u
\n
"
,
i
,
err
);
ok
(
ret
==
0
,
"Test %u: ret is %d
\n
"
,
i
,
ret
);
}
else
{
ok
(
ret
==
strlen
(
testset
[
i
].
str
)
+
1
&&
GetLastError
()
==
0xdeadbeef
,
"ret is %d, GetLastError is %u (cp %d)
\n
"
,
ret
,
GetLastError
(),
testset
[
i
].
codepage
);
ok
(
err
==
0xdeadbeef
,
"Test %u: err is %u
\n
"
,
i
,
err
);
ok
(
ret
==
2
,
"Test %u: ret is %d
\n
"
,
i
,
ret
);
}
SetLastError
(
0xdeadbeef
);
ret
=
MultiByteToWideChar
(
testset
[
i
].
codepage
,
0
,
testset
[
i
].
str
,
-
1
,
NULL
,
0
);
ok
(
ret
==
strlen
(
testset
[
i
].
str
)
+
1
&&
GetLastError
()
==
0xdeadbeef
,
"ret is %d, GetLastError is %u (cp %d)
\n
"
,
ret
,
GetLastError
(),
testset
[
i
].
codepage
);
err
=
GetLastError
();
ok
(
err
==
0xdeadbeef
,
"Test %u: err is %u
\n
"
,
i
,
err
);
ok
(
ret
==
2
,
"Test %u: ret is %d
\n
"
,
i
,
ret
);
}
}
...
...
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