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
ab355d6e
Commit
ab355d6e
authored
Apr 14, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Apr 15, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
devenum/tests: Avoid running test_devenum() twice.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
dc214bfa
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
15 deletions
+13
-15
devenum.c
dlls/devenum/tests/devenum.c
+13
-15
No files found.
dlls/devenum/tests/devenum.c
View file @
ab355d6e
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
DEFINE_GUID
(
GUID_NULL
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
);
static
void
test_devenum
(
IBindCtx
*
bind_ctx
)
static
void
test_devenum
(
void
)
{
{
IEnumMoniker
*
enum_cat
,
*
enum_moniker
;
IEnumMoniker
*
enum_cat
,
*
enum_moniker
;
ICreateDevEnum
*
create_devenum
;
ICreateDevEnum
*
create_devenum
;
...
@@ -45,6 +45,7 @@ static void test_devenum(IBindCtx *bind_ctx)
...
@@ -45,6 +45,7 @@ static void test_devenum(IBindCtx *bind_ctx)
IMoniker
*
moniker
;
IMoniker
*
moniker
;
GUID
cat_guid
,
clsid
;
GUID
cat_guid
,
clsid
;
WCHAR
*
displayname
;
WCHAR
*
displayname
;
IBindCtx
*
bindctx
;
VARIANT
var
;
VARIANT
var
;
HRESULT
hr
;
HRESULT
hr
;
int
count
;
int
count
;
...
@@ -58,7 +59,7 @@ static void test_devenum(IBindCtx *bind_ctx)
...
@@ -58,7 +59,7 @@ static void test_devenum(IBindCtx *bind_ctx)
while
(
IEnumMoniker_Next
(
enum_cat
,
1
,
&
moniker
,
NULL
)
==
S_OK
)
while
(
IEnumMoniker_Next
(
enum_cat
,
1
,
&
moniker
,
NULL
)
==
S_OK
)
{
{
hr
=
IMoniker_BindToStorage
(
moniker
,
bind_ctx
,
NULL
,
&
IID_IPropertyBag
,
(
void
**
)
&
prop_bag
);
hr
=
IMoniker_BindToStorage
(
moniker
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
void
**
)
&
prop_bag
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed: %#x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed: %#x
\n
"
,
hr
);
VariantInit
(
&
var
);
VariantInit
(
&
var
);
...
@@ -100,7 +101,7 @@ static void test_devenum(IBindCtx *bind_ctx)
...
@@ -100,7 +101,7 @@ static void test_devenum(IBindCtx *bind_ctx)
"Expected CLSID_CDeviceMoniker got %s
\n
"
,
wine_dbgstr_guid
(
&
clsid
));
"Expected CLSID_CDeviceMoniker got %s
\n
"
,
wine_dbgstr_guid
(
&
clsid
));
VariantInit
(
&
var
);
VariantInit
(
&
var
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bind_ctx
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
*
)
&
prop_bag
);
hr
=
IMoniker_BindToStorage
(
moniker
,
NULL
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
*
)
&
prop_bag
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed with error %x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed with error %x
\n
"
,
hr
);
hr
=
IPropertyBag_Read
(
prop_bag
,
L"FriendlyName"
,
&
var
,
NULL
);
hr
=
IPropertyBag_Read
(
prop_bag
,
L"FriendlyName"
,
&
var
,
NULL
);
...
@@ -110,9 +111,16 @@ static void test_devenum(IBindCtx *bind_ctx)
...
@@ -110,9 +111,16 @@ static void test_devenum(IBindCtx *bind_ctx)
if
(
winetest_debug
>
1
)
if
(
winetest_debug
>
1
)
trace
(
" %s %s
\n
"
,
wine_dbgstr_w
(
displayname
),
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
trace
(
" %s %s
\n
"
,
wine_dbgstr_w
(
displayname
),
wine_dbgstr_w
(
V_BSTR
(
&
var
)));
hr
=
IMoniker_BindToObject
(
moniker
,
bind_ctx
,
NULL
,
&
IID_IUnknown
,
NULL
);
hr
=
IMoniker_BindToObject
(
moniker
,
NULL
,
NULL
,
&
IID_IUnknown
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %#x
\n
"
,
hr
);
hr
=
CreateBindCtx
(
0
,
&
bindctx
);
ok
(
hr
==
S_OK
,
"Got hr %#x.
\n
"
,
hr
);
hr
=
IMoniker_BindToStorage
(
moniker
,
bindctx
,
NULL
,
&
IID_IPropertyBag
,
(
LPVOID
*
)
&
prop_bag
);
ok
(
hr
==
S_OK
,
"IMoniker_BindToStorage failed with error %x
\n
"
,
hr
);
IPropertyBag_Release
(
prop_bag
);
IBindCtx_Release
(
bindctx
);
VariantClear
(
&
var
);
VariantClear
(
&
var
);
CoTaskMemFree
(
displayname
);
CoTaskMemFree
(
displayname
);
IPropertyBag_Release
(
prop_bag
);
IPropertyBag_Release
(
prop_bag
);
...
@@ -1087,21 +1095,11 @@ static void test_vfw(void)
...
@@ -1087,21 +1095,11 @@ static void test_vfw(void)
START_TEST
(
devenum
)
START_TEST
(
devenum
)
{
{
IBindCtx
*
bind_ctx
=
NULL
;
HRESULT
hr
;
HRESULT
hr
;
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
test_devenum
(
NULL
);
test_devenum
();
/* IBindCtx is allowed in IMoniker_BindToStorage (IMediaCatMoniker_BindToStorage) */
hr
=
CreateBindCtx
(
0
,
&
bind_ctx
);
ok
(
hr
==
S_OK
,
"Cannot create BindCtx: (res = 0x%x)
\n
"
,
hr
);
if
(
bind_ctx
)
{
test_devenum
(
bind_ctx
);
IBindCtx_Release
(
bind_ctx
);
}
test_moniker_isequal
();
test_moniker_isequal
();
test_register_filter
();
test_register_filter
();
test_directshow_filter
();
test_directshow_filter
();
...
...
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