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
e1c57c27
Commit
e1c57c27
authored
May 15, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
May 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/tests: Test filter mapper interfaces.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
cecd09ce
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
0 deletions
+40
-0
filtermapper.c
dlls/quartz/tests/filtermapper.c
+40
-0
No files found.
dlls/quartz/tests/filtermapper.c
View file @
e1c57c27
...
...
@@ -27,6 +27,15 @@
#include "initguid.h"
#include "wine/fil_data.h"
static
IFilterMapper3
*
create_mapper
(
void
)
{
IFilterMapper3
*
ret
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_FilterMapper2
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IFilterMapper3
,
(
void
**
)
&
ret
);
ok
(
hr
==
S_OK
,
"Failed to create filter mapper, hr %#x.
\n
"
,
hr
);
return
ret
;
}
static
ULONG
get_refcount
(
void
*
iface
)
{
IUnknown
*
unknown
=
iface
;
...
...
@@ -34,6 +43,36 @@ static ULONG get_refcount(void *iface)
return
IUnknown_Release
(
unknown
);
}
#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
static
void
check_interface_
(
unsigned
int
line
,
void
*
iface_ptr
,
REFIID
iid
,
BOOL
supported
)
{
IUnknown
*
iface
=
iface_ptr
;
HRESULT
hr
,
expected_hr
;
IUnknown
*
unk
;
expected_hr
=
supported
?
S_OK
:
E_NOINTERFACE
;
hr
=
IUnknown_QueryInterface
(
iface
,
iid
,
(
void
**
)
&
unk
);
ok_
(
__FILE__
,
line
)(
hr
==
expected_hr
,
"Got hr %#x, expected %#x.
\n
"
,
hr
,
expected_hr
);
if
(
SUCCEEDED
(
hr
))
IUnknown_Release
(
unk
);
}
static
void
test_interfaces
(
void
)
{
IFilterMapper3
*
mapper
=
create_mapper
();
check_interface
(
mapper
,
&
IID_IAMFilterData
,
TRUE
);
check_interface
(
mapper
,
&
IID_IFilterMapper
,
TRUE
);
check_interface
(
mapper
,
&
IID_IFilterMapper2
,
TRUE
);
check_interface
(
mapper
,
&
IID_IFilterMapper3
,
TRUE
);
check_interface
(
mapper
,
&
IID_IUnknown
,
TRUE
);
check_interface
(
mapper
,
&
IID_IFilterGraph
,
FALSE
);
IFilterMapper3_Release
(
mapper
);
}
/* Helper function, checks if filter with given name was enumerated. */
static
BOOL
enum_find_filter
(
const
WCHAR
*
wszFilterName
,
IEnumMoniker
*
pEnum
)
{
...
...
@@ -624,6 +663,7 @@ START_TEST(filtermapper)
{
CoInitialize
(
NULL
);
test_interfaces
();
test_fm2_enummatchingfilters
();
test_legacy_filter_registration
();
test_ifiltermapper_from_filtergraph
();
...
...
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