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
c4d5e8de
Commit
c4d5e8de
authored
Aug 05, 2023
by
Mohamad Al-Jaf
Committed by
Alexandre Julliard
Oct 02, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
windows.storage.applicationdata/tests: Add IApplicationDataStatics::get_Current() tests.
parent
f36a84d7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
52 additions
and
0 deletions
+52
-0
application.c
dlls/windows.applicationmodel/tests/application.c
+43
-0
model.c
dlls/windows.applicationmodel/tests/model.c
+1
-0
data.c
dlls/windows.storage.applicationdata/tests/data.c
+8
-0
No files found.
dlls/windows.applicationmodel/tests/application.c
View file @
c4d5e8de
...
...
@@ -55,6 +55,48 @@ static void check_interface_( unsigned int line, void *obj, const IID *iid )
IUnknown_Release
(
unk
);
}
static
void
test_ApplicationDataStatics
(
void
)
{
static
const
WCHAR
*
application_data_statics_name
=
L"Windows.Storage.ApplicationData"
;
IApplicationDataStatics
*
application_data_statics
;
IApplicationData
*
application_data
;
IActivationFactory
*
factory
;
HSTRING
str
;
HRESULT
hr
;
LONG
ref
;
hr
=
WindowsCreateString
(
application_data_statics_name
,
wcslen
(
application_data_statics_name
),
&
str
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
RoGetActivationFactory
(
str
,
&
IID_IActivationFactory
,
(
void
**
)
&
factory
);
WindowsDeleteString
(
str
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
REGDB_E_CLASSNOTREG
),
"got hr %#lx.
\n
"
,
hr
);
if
(
hr
==
REGDB_E_CLASSNOTREG
)
{
win_skip
(
"%s runtimeclass not registered, skipping tests.
\n
"
,
wine_dbgstr_w
(
application_data_statics_name
)
);
return
;
}
check_interface
(
factory
,
&
IID_IUnknown
);
check_interface
(
factory
,
&
IID_IInspectable
);
check_interface
(
factory
,
&
IID_IAgileObject
);
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IApplicationDataStatics
,
(
void
**
)
&
application_data_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IApplicationDataStatics_get_Current
(
application_data_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IApplicationDataStatics_get_Current
(
application_data_statics
,
&
application_data
);
todo_wine
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
application_data
!=
NULL
,
"got NULL application_data %p.
\n
"
,
application_data
);
if
(
application_data
)
IApplicationData_Release
(
application_data
);
ref
=
IApplicationDataStatics_Release
(
application_data_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
ok
(
ref
==
1
,
"got ref %ld.
\n
"
,
ref
);
}
static
void
test_PackageStatics
(
void
)
{
static
const
WCHAR
*
package_statics_name
=
L"Windows.ApplicationModel.Package"
;
...
...
@@ -143,6 +185,7 @@ int main( int argc, char const *argv[] )
hr
=
RoInitialize
(
RO_INIT_MULTITHREADED
);
ok
(
hr
==
S_OK
,
"RoInitialize failed, hr %#lx
\n
"
,
hr
);
test_ApplicationDataStatics
();
test_PackageStatics
();
RoUninitialize
();
...
...
dlls/windows.applicationmodel/tests/model.c
View file @
c4d5e8de
...
...
@@ -571,6 +571,7 @@ static void test_PackageStatics(void)
hr
=
IPackageStatics_get_Current
(
package_statics
,
&
package
);
todo_wine
ok
(
hr
==
0x80073d54
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
package
,
"got package %p.
\n
"
,
package
);
if
(
package
)
IPackage_Release
(
package
);
ref
=
IPackageStatics_Release
(
package_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
...
...
dlls/windows.storage.applicationdata/tests/data.c
View file @
c4d5e8de
...
...
@@ -49,6 +49,7 @@ static void test_ApplicationDataStatics(void)
{
static
const
WCHAR
*
application_data_statics_name
=
L"Windows.Storage.ApplicationData"
;
IApplicationDataStatics
*
application_data_statics
;
IApplicationData
*
application_data
=
NULL
;
IActivationFactory
*
factory
;
HSTRING
str
;
HRESULT
hr
;
...
...
@@ -73,6 +74,13 @@ static void test_ApplicationDataStatics(void)
hr
=
IActivationFactory_QueryInterface
(
factory
,
&
IID_IApplicationDataStatics
,
(
void
**
)
&
application_data_statics
);
ok
(
hr
==
S_OK
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IApplicationDataStatics_get_Current
(
application_data_statics
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got hr %#lx.
\n
"
,
hr
);
hr
=
IApplicationDataStatics_get_Current
(
application_data_statics
,
&
application_data
);
todo_wine
ok
(
hr
==
0x80073d54
,
"got hr %#lx.
\n
"
,
hr
);
todo_wine
ok
(
!
application_data
,
"got application_data %p.
\n
"
,
application_data
);
if
(
application_data
)
IApplicationData_Release
(
application_data
);
ref
=
IApplicationDataStatics_Release
(
application_data_statics
);
ok
(
ref
==
2
,
"got ref %ld.
\n
"
,
ref
);
ref
=
IActivationFactory_Release
(
factory
);
...
...
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