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
37e5d4c5
Commit
37e5d4c5
authored
Feb 12, 2014
by
Michael Stefaniuc
Committed by
Alexandre Julliard
Feb 12, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
qedit/tests: COM tests for IEnumPins from SampleGrabber.
parent
ec9d32ad
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
0 deletions
+33
-0
mediadet.c
dlls/qedit/tests/mediadet.c
+33
-0
No files found.
dlls/qedit/tests/mediadet.c
View file @
37e5d4c5
...
...
@@ -432,6 +432,38 @@ static void test_samplegrabber(void)
while
(
ISampleGrabber_Release
(
sg
));
}
static
void
test_COM_sg_enumpins
(
void
)
{
IBaseFilter
*
bf
;
IEnumPins
*
pins
,
*
pins2
;
IUnknown
*
unk
;
ULONG
refcount
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_SampleGrabber
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
void
**
)
&
bf
);
ok
(
hr
==
S_OK
,
"SampleGrabber create failed: %08x, expected S_OK
\n
"
,
hr
);
hr
=
IBaseFilter_EnumPins
(
bf
,
&
pins
);
ok
(
hr
==
S_OK
,
"EnumPins create failed: %08x, expected S_OK
\n
"
,
hr
);
/* Same refcount for all EnumPins interfaces */
refcount
=
IEnumPins_AddRef
(
pins
);
ok
(
refcount
==
2
,
"refcount == %u, expected 2
\n
"
,
refcount
);
hr
=
IEnumPins_QueryInterface
(
pins
,
&
IID_IEnumPins
,
(
void
**
)
&
pins2
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IEnumPins failed: %08x
\n
"
,
hr
);
ok
(
pins
==
pins2
,
"QueryInterface for self failed (%p != %p)
\n
"
,
pins
,
pins2
);
IEnumPins_Release
(
pins2
);
hr
=
IEnumPins_QueryInterface
(
pins
,
&
IID_IUnknown
,
(
void
**
)
&
unk
);
ok
(
hr
==
S_OK
,
"QueryInterface for IID_IUnknown failed: %08x
\n
"
,
hr
);
refcount
=
IUnknown_AddRef
(
unk
);
ok
(
refcount
==
4
,
"refcount == %u, expected 4
\n
"
,
refcount
);
refcount
=
IUnknown_Release
(
unk
);
while
(
IEnumPins_Release
(
pins
));
IBaseFilter_Release
(
bf
);
}
START_TEST
(
mediadet
)
{
if
(
!
init_tests
())
...
...
@@ -443,5 +475,6 @@ START_TEST(mediadet)
CoInitialize
(
NULL
);
test_mediadet
();
test_samplegrabber
();
test_COM_sg_enumpins
();
CoUninitialize
();
}
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