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
309c1014
Commit
309c1014
authored
Mar 09, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 09, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.globalization/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
1aebae92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
27 deletions
+26
-27
Makefile.in
dlls/windows.globalization/tests/Makefile.in
+0
-1
globalization.c
dlls/windows.globalization/tests/globalization.c
+26
-26
No files found.
dlls/windows.globalization/tests/Makefile.in
View file @
309c1014
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
windows.globalization.dll
IMPORTS
=
combase uuid
...
...
dlls/windows.globalization/tests/globalization.c
View file @
309c1014
...
...
@@ -59,13 +59,13 @@ static void test_GlobalizationPreferences(void)
GetUserDefaultLocaleName
(
locale
,
LOCALE_NAME_MAX_LENGTH
);
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#
l
x
\n
"
,
hr
);
hr
=
WindowsCreateString
(
class_name
,
wcslen
(
class_name
),
&
str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"RoGetActivationFactory failed, hr %#
l
x
\n
"
,
hr
);
if
(
hr
==
REGDB_E_CLASSNOTREG
)
{
win_skip
(
"%s runtimeclass not registered, skipping tests.
\n
"
,
wine_dbgstr_w
(
class_name
));
...
...
@@ -75,26 +75,26 @@ static void test_GlobalizationPreferences(void)
}
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IInspectable
,
(
void
**
)
&
inspectable
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInspectable failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IInspectable failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IAgileObject
,
(
void
**
)
&
agile_object
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IAgileObject failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IGlobalizationPreferencesStatics
,
(
void
**
)
&
preferences_statics
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IGlobalizationPreferencesStatics failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IActivationFactory_QueryInterface IID_IGlobalizationPreferencesStatics failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IGlobalizationPreferencesStatics_QueryInterface
(
preferences_statics
,
&
IID_IInspectable
,
(
void
**
)
&
tmp_inspectable
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_inspectable
==
inspectable
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IInspectable returned %p, expected %p
\n
"
,
tmp_inspectable
,
inspectable
);
IInspectable_Release
(
tmp_inspectable
);
hr
=
IGlobalizationPreferencesStatics_QueryInterface
(
preferences_statics
,
&
IID_IAgileObject
,
(
void
**
)
&
tmp_agile_object
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_agile_object
==
agile_object
,
"IGlobalizationPreferencesStatics_QueryInterface IID_IAgileObject returned %p, expected %p
\n
"
,
tmp_agile_object
,
agile_object
);
IAgileObject_Release
(
tmp_agile_object
);
hr
=
IGlobalizationPreferencesStatics_get_HomeGeographicRegion
(
preferences_statics
,
&
tmp_str
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_HomeGeographicRegion failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_HomeGeographicRegion failed, hr %#
l
x
\n
"
,
hr
);
buf
=
WindowsGetStringRawBuffer
(
tmp_str
,
&
len
);
ok
(
buf
!=
NULL
&&
len
>
0
,
"WindowsGetStringRawBuffer returned buf %p, len %u
\n
"
,
buf
,
len
);
...
...
@@ -112,25 +112,25 @@ static void test_GlobalizationPreferences(void)
WindowsDeleteString
(
tmp_str
);
hr
=
IGlobalizationPreferencesStatics_get_Languages
(
preferences_statics
,
&
languages
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Languages failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Languages failed, hr %#
l
x
\n
"
,
hr
);
hr
=
IVectorView_HSTRING_QueryInterface
(
languages
,
&
IID_IInspectable
,
(
void
**
)
&
tmp_inspectable
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_QueryInterface failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_QueryInterface failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_inspectable
!=
inspectable
,
"IVectorView_HSTRING_QueryInterface returned %p, expected %p
\n
"
,
tmp_inspectable
,
inspectable
);
IInspectable_Release
(
tmp_inspectable
);
hr
=
IVectorView_HSTRING_QueryInterface
(
languages
,
&
IID_IAgileObject
,
(
void
**
)
&
tmp_agile_object
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_QueryInterface failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_QueryInterface failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_agile_object
!=
agile_object
,
"IVectorView_HSTRING_QueryInterface IID_IAgileObject returned agile_object
\n
"
);
IAgileObject_Release
(
tmp_agile_object
);
size
=
0xdeadbeef
;
hr
=
IVectorView_HSTRING_get_Size
(
languages
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#
l
x
\n
"
,
hr
);
ok
(
size
!=
0
&&
size
!=
0xdeadbeef
,
"IVectorView_HSTRING_get_Size returned %u
\n
"
,
size
);
hr
=
IVectorView_HSTRING_GetAt
(
languages
,
0
,
&
tmp_str
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#
l
x
\n
"
,
hr
);
buf
=
WindowsGetStringRawBuffer
(
tmp_str
,
&
len
);
ok
(
buf
!=
NULL
&&
len
>
0
,
"WindowsGetStringRawBuffer returned buf %p, len %u
\n
"
,
buf
,
len
);
...
...
@@ -141,34 +141,34 @@ static void test_GlobalizationPreferences(void)
i
=
0xdeadbeef
;
found
=
FALSE
;
hr
=
IVectorView_HSTRING_IndexOf
(
languages
,
tmp_str
,
&
i
,
&
found
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_IndexOf failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_IndexOf failed, hr %#
l
x
\n
"
,
hr
);
ok
(
i
==
0
&&
found
==
TRUE
,
"IVectorView_HSTRING_IndexOf returned size %d, found %d
\n
"
,
size
,
found
);
WindowsDeleteString
(
tmp_str
);
hr
=
WindowsCreateString
(
L"deadbeef"
,
8
,
&
tmp_str
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"WindowsCreateString failed, hr %#
l
x
\n
"
,
hr
);
i
=
0xdeadbeef
;
found
=
TRUE
;
hr
=
IVectorView_HSTRING_IndexOf
(
languages
,
tmp_str
,
&
i
,
&
found
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_IndexOf failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_IndexOf failed, hr %#
l
x
\n
"
,
hr
);
ok
(
i
==
0
&&
found
==
FALSE
,
"IVectorView_HSTRING_IndexOf returned size %d, found %d
\n
"
,
size
,
found
);
WindowsDeleteString
(
tmp_str
);
tmp_str
=
(
HSTRING
)
0xdeadbeef
;
hr
=
IVectorView_HSTRING_GetAt
(
languages
,
size
,
&
tmp_str
);
ok
(
hr
==
E_BOUNDS
,
"IVectorView_HSTRING_GetAt failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
E_BOUNDS
,
"IVectorView_HSTRING_GetAt failed, hr %#
l
x
\n
"
,
hr
);
ok
(
tmp_str
==
NULL
,
"IVectorView_HSTRING_GetAt returned %p
\n
"
,
tmp_str
);
tmp_str
=
(
HSTRING
)
0xdeadbeef
;
hr
=
IVectorView_HSTRING_GetMany
(
languages
,
size
,
1
,
&
tmp_str
,
&
i
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#
l
x
\n
"
,
hr
);
ok
(
i
==
0
&&
tmp_str
==
NULL
,
"IVectorView_HSTRING_GetMany returned count %u, str %p
\n
"
,
i
,
tmp_str
);
hr
=
IVectorView_HSTRING_GetMany
(
languages
,
0
,
1
,
&
tmp_str
,
&
i
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_GetAt failed, hr %#
l
x
\n
"
,
hr
);
ok
(
i
==
1
,
"IVectorView_HSTRING_GetMany returned count %u, expected 1
\n
"
,
i
);
buf
=
WindowsGetStringRawBuffer
(
tmp_str
,
&
len
);
...
...
@@ -184,33 +184,33 @@ static void test_GlobalizationPreferences(void)
hr
=
IGlobalizationPreferencesStatics_get_Calendars
(
preferences_statics
,
&
calendars
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Calendars failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Calendars failed, hr %#
l
x
\n
"
,
hr
);
size
=
0xdeadbeef
;
hr
=
IVectorView_HSTRING_get_Size
(
calendars
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#
l
x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
&&
size
!=
0xdeadbeef
,
"IVectorView_HSTRING_get_Size returned %u
\n
"
,
size
);
IVectorView_HSTRING_Release
(
calendars
);
hr
=
IGlobalizationPreferencesStatics_get_Clocks
(
preferences_statics
,
&
clocks
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Clocks failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Clocks failed, hr %#
l
x
\n
"
,
hr
);
size
=
0xdeadbeef
;
hr
=
IVectorView_HSTRING_get_Size
(
clocks
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#
l
x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
&&
size
!=
0xdeadbeef
,
"IVectorView_HSTRING_get_Size returned %u
\n
"
,
size
);
IVectorView_HSTRING_Release
(
clocks
);
hr
=
IGlobalizationPreferencesStatics_get_Currencies
(
preferences_statics
,
&
currencies
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Currencies failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IGlobalizationPreferencesStatics_get_Currencies failed, hr %#
l
x
\n
"
,
hr
);
size
=
0xdeadbeef
;
hr
=
IVectorView_HSTRING_get_Size
(
currencies
,
&
size
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IVectorView_HSTRING_get_Size failed, hr %#
l
x
\n
"
,
hr
);
todo_wine
ok
(
size
!=
0
&&
size
!=
0xdeadbeef
,
"IVectorView_HSTRING_get_Size returned %u
\n
"
,
size
);
IVectorView_HSTRING_Release
(
currencies
);
...
...
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