Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
d07f76e3
Commit
d07f76e3
authored
Mar 25, 2015
by
Michael Müller
Committed by
Alexandre Julliard
Mar 25, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm/tests: Add tests for ConnectionPointContainer::FindConnectionPoint.
The refcounting is also tested because some apps depend on that.
parent
8e999722
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
1 deletion
+27
-1
list.c
dlls/netprofm/tests/list.c
+27
-1
No files found.
dlls/netprofm/tests/list.c
View file @
d07f76e3
...
...
@@ -27,12 +27,15 @@
static
void
test_INetworkListManager
(
void
)
{
IConnectionPointContainer
*
cpc
;
IConnectionPointContainer
*
cpc
,
*
cpc2
;
INetworkListManager
*
mgr
;
INetworkCostManager
*
cost_mgr
;
NLM_CONNECTIVITY
connectivity
;
VARIANT_BOOL
connected
;
IConnectionPoint
*
pt
;
HRESULT
hr
;
ULONG
ref1
,
ref2
;
IID
iid
;
hr
=
CoCreateInstance
(
&
CLSID_NetworkListManager
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_INetworkListManager
,
(
void
**
)
&
mgr
);
...
...
@@ -78,8 +81,31 @@ static void test_INetworkListManager( void )
hr
=
INetworkListManager_QueryInterface
(
mgr
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
cpc
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ref1
=
IConnectionPointContainer_AddRef
(
cpc
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkListManagerEvents
,
&
pt
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ref2
=
IConnectionPointContainer_AddRef
(
cpc
);
ok
(
ref2
==
ref1
+
2
,
"Expected refcount %d, got %d
\n
"
,
ref1
+
2
,
ref2
);
IConnectionPointContainer_Release
(
cpc
);
IConnectionPointContainer_Release
(
cpc
);
hr
=
IConnectionPoint_GetConnectionPointContainer
(
pt
,
&
cpc2
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
cpc2
==
cpc
,
"Expected cpc2 == %p, but got %p
\n
"
,
cpc
,
cpc2
);
IConnectionPointContainer_Release
(
cpc2
);
memset
(
&
iid
,
0
,
sizeof
(
iid
)
);
hr
=
IConnectionPoint_GetConnectionInterface
(
pt
,
&
iid
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
!
memcmp
(
&
iid
,
&
IID_INetworkListManagerEvents
,
sizeof
(
iid
)
),
"Expected iid to be IID_INetworkListManagerEvents
\n
"
);
IConnectionPoint_Release
(
pt
);
IConnectionPointContainer_Release
(
cpc
);
INetworkListManager_Release
(
mgr
);
}
...
...
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