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
ee518b5e
Commit
ee518b5e
authored
Feb 12, 2014
by
Nikolay Sivov
Committed by
Alexandre Julliard
Feb 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Don't test last error when there's no failure.
parent
7066ce0b
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
16 deletions
+2
-16
codepage.c
dlls/kernel32/tests/codepage.c
+2
-16
No files found.
dlls/kernel32/tests/codepage.c
View file @
ee518b5e
...
@@ -546,32 +546,22 @@ static void test_threadcp(void)
...
@@ -546,32 +546,22 @@ static void test_threadcp(void)
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
memset
(
&
cpi
,
0
,
sizeof
(
cpi
));
memset
(
&
cpi
,
0
,
sizeof
(
cpi
));
ret
=
GetCPInfoExA
(
CP_ACP
,
0
,
&
cpi
);
ret
=
GetCPInfoExA
(
CP_ACP
,
0
,
&
cpi
);
ok
(
ret
,
"GetCPInfoExA failed for lcid %04x
\n
"
,
lcids
[
i
].
lcid
);
ok
(
ret
,
"GetCPInfoExA failed for lcid %04x, error %d
\n
"
,
lcids
[
i
].
lcid
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
||
broken
(
GetLastError
()
==
ERROR_RESOURCE_LANG_NOT_FOUND
),
/* win2k */
"GetLastError() is %u for lcid %04x
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
ok
(
cpi
.
CodePage
==
acp
,
"wrong codepage %u for lcid %04x, should be %u
\n
"
,
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
acp
);
ok
(
cpi
.
CodePage
==
acp
,
"wrong codepage %u for lcid %04x, should be %u
\n
"
,
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
acp
);
/* WideCharToMultiByte - CP_ACP */
/* WideCharToMultiByte - CP_ACP */
SetLastError
(
0xdeadbeef
);
num
=
WideCharToMultiByte
(
CP_ACP
,
0
,
foobarW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
num
=
WideCharToMultiByte
(
CP_ACP
,
0
,
foobarW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"GetLastError() is %u (%04x)
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
/* MultiByteToWideChar - CP_ACP */
/* MultiByteToWideChar - CP_ACP */
SetLastError
(
0xdeadbeef
);
num
=
MultiByteToWideChar
(
CP_ACP
,
0
,
"foobar"
,
-
1
,
NULL
,
0
);
num
=
MultiByteToWideChar
(
CP_ACP
,
0
,
"foobar"
,
-
1
,
NULL
,
0
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"GetLastError() is %u (%04x)
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
/* GetCPInfoEx/GetCPInfo - CP_THREAD_ACP */
/* GetCPInfoEx/GetCPInfo - CP_THREAD_ACP */
SetLastError
(
0xdeadbeef
);
SetLastError
(
0xdeadbeef
);
memset
(
&
cpi
,
0
,
sizeof
(
cpi
));
memset
(
&
cpi
,
0
,
sizeof
(
cpi
));
ret
=
GetCPInfoExA
(
CP_THREAD_ACP
,
0
,
&
cpi
);
ret
=
GetCPInfoExA
(
CP_THREAD_ACP
,
0
,
&
cpi
);
ok
(
ret
,
"GetCPInfoExA failed for lcid %04x
\n
"
,
lcids
[
i
].
lcid
);
ok
(
ret
,
"GetCPInfoExA failed for lcid %04x, error %d
\n
"
,
lcids
[
i
].
lcid
,
GetLastError
());
ok
(
GetLastError
()
==
0xdeadbeef
||
broken
(
GetLastError
()
==
ERROR_RESOURCE_LANG_NOT_FOUND
),
/* win2k */
"GetLastError() is %u for lcid %04x
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
if
(
lcids
[
i
].
threadcp
)
if
(
lcids
[
i
].
threadcp
)
ok
(
cpi
.
CodePage
==
lcids
[
i
].
threadcp
,
"wrong codepage %u for lcid %04x, should be %u
\n
"
,
ok
(
cpi
.
CodePage
==
lcids
[
i
].
threadcp
,
"wrong codepage %u for lcid %04x, should be %u
\n
"
,
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
lcids
[
i
].
threadcp
);
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
lcids
[
i
].
threadcp
);
...
@@ -580,16 +570,12 @@ static void test_threadcp(void)
...
@@ -580,16 +570,12 @@ static void test_threadcp(void)
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
acp
);
cpi
.
CodePage
,
lcids
[
i
].
lcid
,
acp
);
/* WideCharToMultiByte - CP_THREAD_ACP */
/* WideCharToMultiByte - CP_THREAD_ACP */
SetLastError
(
0xdeadbeef
);
num
=
WideCharToMultiByte
(
CP_THREAD_ACP
,
0
,
foobarW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
num
=
WideCharToMultiByte
(
CP_THREAD_ACP
,
0
,
foobarW
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"GetLastError() is %u (%04x)
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
/* MultiByteToWideChar - CP_THREAD_ACP */
/* MultiByteToWideChar - CP_THREAD_ACP */
SetLastError
(
0xdeadbeef
);
num
=
MultiByteToWideChar
(
CP_THREAD_ACP
,
0
,
"foobar"
,
-
1
,
NULL
,
0
);
num
=
MultiByteToWideChar
(
CP_THREAD_ACP
,
0
,
"foobar"
,
-
1
,
NULL
,
0
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
num
==
7
,
"ret is %d (%04x)
\n
"
,
num
,
lcids
[
i
].
lcid
);
ok
(
GetLastError
()
==
0xdeadbeef
,
"GetLastError() is %u (%04x)
\n
"
,
GetLastError
(),
lcids
[
i
].
lcid
);
}
}
/* IsDBCSLeadByteEx - locales without codepage */
/* IsDBCSLeadByteEx - locales without codepage */
...
...
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