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
52ffd338
Commit
52ffd338
authored
Nov 21, 2022
by
Santino Mazza
Committed by
Alexandre Julliard
Nov 22, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32/tests: Test for GetGeoInfoEx.
parent
f51c752c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
34 additions
and
0 deletions
+34
-0
locale.c
dlls/kernel32/tests/locale.c
+34
-0
No files found.
dlls/kernel32/tests/locale.c
View file @
52ffd338
...
@@ -78,6 +78,7 @@ static INT (WINAPI *pCompareStringEx)(LPCWSTR, DWORD, LPCWSTR, INT, LPCWSTR, INT
...
@@ -78,6 +78,7 @@ static INT (WINAPI *pCompareStringEx)(LPCWSTR, DWORD, LPCWSTR, INT, LPCWSTR, INT
LPNLSVERSIONINFO
,
LPVOID
,
LPARAM
);
LPNLSVERSIONINFO
,
LPVOID
,
LPARAM
);
static
INT
(
WINAPI
*
pGetGeoInfoA
)(
GEOID
,
GEOTYPE
,
LPSTR
,
INT
,
LANGID
);
static
INT
(
WINAPI
*
pGetGeoInfoA
)(
GEOID
,
GEOTYPE
,
LPSTR
,
INT
,
LANGID
);
static
INT
(
WINAPI
*
pGetGeoInfoW
)(
GEOID
,
GEOTYPE
,
LPWSTR
,
INT
,
LANGID
);
static
INT
(
WINAPI
*
pGetGeoInfoW
)(
GEOID
,
GEOTYPE
,
LPWSTR
,
INT
,
LANGID
);
static
INT
(
WINAPI
*
pGetGeoInfoEx
)(
const
WCHAR
*
,
GEOTYPE
,
PWSTR
,
INT
);
static
INT
(
WINAPI
*
pGetUserDefaultGeoName
)(
LPWSTR
,
int
);
static
INT
(
WINAPI
*
pGetUserDefaultGeoName
)(
LPWSTR
,
int
);
static
BOOL
(
WINAPI
*
pSetUserGeoName
)(
PWSTR
);
static
BOOL
(
WINAPI
*
pSetUserGeoName
)(
PWSTR
);
static
BOOL
(
WINAPI
*
pEnumSystemGeoID
)(
GEOCLASS
,
GEOID
,
GEO_ENUMPROC
);
static
BOOL
(
WINAPI
*
pEnumSystemGeoID
)(
GEOCLASS
,
GEOID
,
GEO_ENUMPROC
);
...
@@ -132,6 +133,7 @@ static void InitFunctionPointers(void)
...
@@ -132,6 +133,7 @@ static void InitFunctionPointers(void)
X
(
CompareStringEx
);
X
(
CompareStringEx
);
X
(
GetGeoInfoA
);
X
(
GetGeoInfoA
);
X
(
GetGeoInfoW
);
X
(
GetGeoInfoW
);
X
(
GetGeoInfoEx
);
X
(
GetUserDefaultGeoName
);
X
(
GetUserDefaultGeoName
);
X
(
SetUserGeoName
);
X
(
SetUserGeoName
);
X
(
EnumSystemGeoID
);
X
(
EnumSystemGeoID
);
...
@@ -5856,6 +5858,7 @@ static void test_CompareStringOrdinal(void)
...
@@ -5856,6 +5858,7 @@ static void test_CompareStringOrdinal(void)
static
void
test_GetGeoInfo
(
void
)
static
void
test_GetGeoInfo
(
void
)
{
{
char
buffA
[
20
];
char
buffA
[
20
];
WCHAR
buffW
[
20
];
INT
ret
;
INT
ret
;
if
(
!
pGetGeoInfoA
)
if
(
!
pGetGeoInfoA
)
...
@@ -5964,6 +5967,37 @@ static void test_GetGeoInfo(void)
...
@@ -5964,6 +5967,37 @@ static void test_GetGeoInfo(void)
ret
=
pGetGeoInfoA
(
203
,
GEO_ID
+
1
,
NULL
,
0
,
0
);
ret
=
pGetGeoInfoA
(
203
,
GEO_ID
+
1
,
NULL
,
0
,
0
);
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
ok
(
ret
==
0
,
"got %d
\n
"
,
ret
);
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
"got %ld
\n
"
,
GetLastError
());
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
"got %ld
\n
"
,
GetLastError
());
/* Test for GetGeoInfoEx */
if
(
!
pGetGeoInfoEx
)
{
win_skip
(
"GetGeoInfoEx is not available
\n
"
);
return
;
}
/* Test with ISO 3166-1 */
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_ISO3
,
buffW
,
ARRAYSIZE
(
buffW
));
todo_wine
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buffW
,
L"ARG"
),
"expected string to be ARG, got %ls
\n
"
,
buffW
);
/* Test with UN M.49 */
SetLastError
(
0xdeadbeef
);
ret
=
pGetGeoInfoEx
(
L"032"
,
GEO_ISO3
,
buffW
,
ARRAYSIZE
(
buffW
));
ok
(
ret
==
0
,
"expected GetGeoInfoEx to fail.
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_PARAMETER
,
"expected ERROR_INVALID_PARAMETER got %ld.
\n
"
,
GetLastError
());
/* Test GEO_ID */
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_ID
,
buffW
,
ARRAYSIZE
(
buffW
));
todo_wine
ok
(
ret
!=
0
,
"GetGeoInfoEx failed %ld.
\n
"
,
GetLastError
());
todo_wine
ok
(
!
wcscmp
(
buffW
,
L"11"
),
"expected string to be 11, got %ls
\n
"
,
buffW
);
/* Test with invalid geo type */
SetLastError
(
0xdeadbeef
);
ret
=
pGetGeoInfoEx
(
L"AR"
,
GEO_LCID
,
buffW
,
ARRAYSIZE
(
buffW
));
ok
(
ret
==
0
,
"expected GetGeoInfoEx to fail.
\n
"
);
todo_wine
ok
(
GetLastError
()
==
ERROR_INVALID_FLAGS
,
"expected ERROR_INVALID_PARAMETER got %ld.
\n
"
,
GetLastError
());
}
}
static
int
geoidenum_count
;
static
int
geoidenum_count
;
...
...
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