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
ecbc5da9
Commit
ecbc5da9
authored
Nov 04, 2022
by
Sebastián Aedo
Committed by
Alexandre Julliard
Nov 07, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm: Add INetwork_GetNetworkConnections test.
Signed-off-by:
Sebastián Aedo
<
saedo@codeweavers.com
>
parent
61f56626
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
43 additions
and
3 deletions
+43
-3
list.c
dlls/netprofm/tests/list.c
+43
-3
No files found.
dlls/netprofm/tests/list.c
View file @
ecbc5da9
...
...
@@ -25,15 +25,21 @@
#include "netlistmgr.h"
#include "wine/test.h"
static
void
test_INetwork
(
INetwork
*
network
)
static
void
test_INetwork
(
INetwork
*
network
,
INetworkConnection
*
conn
)
{
NLM_NETWORK_CATEGORY
category
;
NLM_CONNECTIVITY
connectivity
;
NLM_DOMAIN_TYPE
domain_type
;
VARIANT_BOOL
connected
;
IEnumNetworkConnections
*
conn_iter
;
VARIANT_BOOL
is_connection_present
;
GUID
conn_id
;
GUID
local_conn_id
;
GUID
id
;
BSTR
str
;
HRESULT
hr
;
INetworkConnection
*
local_conn
;
ULONG
fetched
;
str
=
NULL
;
hr
=
INetwork_GetName
(
network
,
&
str
);
...
...
@@ -81,6 +87,40 @@ static void test_INetwork( INetwork *network )
hr
=
INetwork_get_IsConnectedToInternet
(
network
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
trace
(
"connected to internet %d
\n
"
,
connected
);
if
(
!
conn
)
return
;
trace
(
"about to test GetNetworkConnections
\n
"
);
memset
(
&
conn_id
,
0
,
sizeof
(
conn_id
)
);
hr
=
INetworkConnection_GetConnectionId
(
conn
,
&
conn_id
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
trace
(
"input connection id %s
\n
"
,
wine_dbgstr_guid
(
&
conn_id
));
conn_iter
=
NULL
;
hr
=
INetwork_GetNetworkConnections
(
network
,
&
conn_iter
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
is_connection_present
=
FALSE
;
if
(
conn_iter
)
{
while
((
hr
=
IEnumNetworkConnections_Next
(
conn_iter
,
1
,
&
local_conn
,
&
fetched
))
==
S_OK
)
{
memset
(
&
local_conn_id
,
0
,
sizeof
(
local_conn_id
)
);
hr
=
INetworkConnection_GetConnectionId
(
local_conn
,
&
local_conn_id
);
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
trace
(
"local connection id %s
\n
"
,
wine_dbgstr_guid
(
&
local_conn_id
));
if
(
IsEqualGUID
(
&
conn_id
,
&
local_conn_id
))
is_connection_present
=
TRUE
;
INetworkConnection_Release
(
local_conn
);
local_conn
=
(
void
*
)
0xdeadbeef
;
}
ok
(
!
local_conn
,
"got wrong pointer: %p.
\n
"
,
local_conn
);
IEnumNetworkConnections_Release
(
conn_iter
);
}
todo_wine
ok
(
is_connection_present
,
"connection was not present in network
\n
"
);
}
static
void
test_INetworkConnection
(
INetworkConnection
*
conn
)
...
...
@@ -130,7 +170,7 @@ static void test_INetworkConnection( INetworkConnection *conn )
ok
(
hr
==
S_OK
,
"got %08lx
\n
"
,
hr
);
if
(
network
)
{
test_INetwork
(
network
);
test_INetwork
(
network
,
conn
);
INetwork_Release
(
network
);
}
...
...
@@ -344,7 +384,7 @@ static void test_INetworkListManager( void )
{
while
((
hr
=
IEnumNetworks_Next
(
network_iter
,
1
,
&
network
,
NULL
))
==
S_OK
)
{
test_INetwork
(
network
);
test_INetwork
(
network
,
NULL
);
INetwork_Release
(
network
);
}
IEnumNetworks_Release
(
network_iter
);
...
...
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