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
722ecd5e
Commit
722ecd5e
authored
Mar 01, 2022
by
Eric Pouech
Committed by
Alexandre Julliard
Mar 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
netprofm/tests: Enable compilation with long types.
Signed-off-by:
Eric Pouech
<
eric.pouech@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
2dd647a5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
48 additions
and
49 deletions
+48
-49
Makefile.in
dlls/netprofm/tests/Makefile.in
+0
-1
list.c
dlls/netprofm/tests/list.c
+48
-48
No files found.
dlls/netprofm/tests/Makefile.in
View file @
722ecd5e
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
TESTDLL
=
netprofm.dll
IMPORTS
=
oleaut32 ole32
...
...
dlls/netprofm/tests/list.c
View file @
722ecd5e
...
...
@@ -37,49 +37,49 @@ static void test_INetwork( INetwork *network )
str
=
NULL
;
hr
=
INetwork_GetName
(
network
,
&
str
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
str
!=
NULL
,
"str not set
\n
"
);
if
(
str
)
trace
(
"name %s
\n
"
,
wine_dbgstr_w
(
str
)
);
SysFreeString
(
str
);
str
=
NULL
;
hr
=
INetwork_GetDescription
(
network
,
&
str
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
todo_wine
ok
(
str
!=
NULL
,
"str not set
\n
"
);
if
(
str
)
trace
(
"description %s
\n
"
,
wine_dbgstr_w
(
str
)
);
SysFreeString
(
str
);
memset
(
&
id
,
0
,
sizeof
(
id
)
);
hr
=
INetwork_GetNetworkId
(
network
,
&
id
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"network id %s
\n
"
,
wine_dbgstr_guid
(
&
id
));
domain_type
=
0xdeadbeef
;
hr
=
INetwork_GetDomainType
(
network
,
&
domain_type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
domain_type
!=
0xdeadbeef
,
"domain_type not set
\n
"
);
trace
(
"domain type %08x
\n
"
,
domain_type
);
category
=
0xdeadbeef
;
hr
=
INetwork_GetCategory
(
network
,
&
category
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
category
!=
0xdeadbeef
,
"category not set
\n
"
);
trace
(
"category %08x
\n
"
,
category
);
connectivity
=
0xdeadbeef
;
hr
=
INetwork_GetConnectivity
(
network
,
&
connectivity
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
connectivity
!=
0xdeadbeef
,
"connectivity not set
\n
"
);
trace
(
"connectivity %08x
\n
"
,
connectivity
);
connected
=
0xdead
;
hr
=
INetwork_get_IsConnected
(
network
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"connected %d
\n
"
,
connected
);
connected
=
0xdead
;
hr
=
INetwork_get_IsConnectedToInternet
(
network
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"connected to internet %d
\n
"
,
connected
);
}
...
...
@@ -95,39 +95,39 @@ static void test_INetworkConnection( INetworkConnection *conn )
memset
(
&
id
,
0
,
sizeof
(
id
)
);
hr
=
INetworkConnection_GetAdapterId
(
conn
,
&
id
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"adapter id %s
\n
"
,
wine_dbgstr_guid
(
&
id
));
memset
(
&
id
,
0
,
sizeof
(
id
)
);
hr
=
INetworkConnection_GetConnectionId
(
conn
,
&
id
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"connection id %s
\n
"
,
wine_dbgstr_guid
(
&
id
));
connectivity
=
0xdeadbeef
;
hr
=
INetworkConnection_GetConnectivity
(
conn
,
&
connectivity
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
connectivity
!=
0xdeadbeef
,
"connectivity not set
\n
"
);
trace
(
"connectivity %08x
\n
"
,
connectivity
);
domain_type
=
0xdeadbeef
;
hr
=
INetworkConnection_GetDomainType
(
conn
,
&
domain_type
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
domain_type
!=
0xdeadbeef
,
"domain_type not set
\n
"
);
trace
(
"domain type %08x
\n
"
,
domain_type
);
connected
=
0xdead
;
hr
=
INetworkConnection_get_IsConnected
(
conn
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"connected %d
\n
"
,
connected
);
connected
=
0xdead
;
hr
=
INetworkConnection_get_IsConnectedToInternet
(
conn
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"connected to internet %d
\n
"
,
connected
);
network
=
NULL
;
hr
=
INetworkConnection_GetNetwork
(
conn
,
&
network
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
if
(
network
)
{
test_INetwork
(
network
);
...
...
@@ -136,7 +136,7 @@ static void test_INetworkConnection( INetworkConnection *conn )
conn_cost
=
NULL
;
hr
=
INetworkConnection_QueryInterface
(
conn
,
&
IID_INetworkConnectionCost
,
(
void
**
)
&
conn_cost
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"got %08
l
x
\n
"
,
hr
);
if
(
conn_cost
)
{
DWORD
cost
;
...
...
@@ -144,13 +144,13 @@ static void test_INetworkConnection( INetworkConnection *conn )
cost
=
0xdeadbeef
;
hr
=
INetworkConnectionCost_GetCost
(
conn_cost
,
&
cost
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
cost
!=
0xdeadbeef
,
"cost not set
\n
"
);
trace
(
"cost %08x
\n
"
,
cost
);
trace
(
"cost %08
l
x
\n
"
,
cost
);
memset
(
&
status
,
0
,
sizeof
(
status
)
);
hr
=
INetworkConnectionCost_GetDataPlanStatus
(
conn_cost
,
&
status
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
trace
(
"InterfaceGuid %s
\n
"
,
wine_dbgstr_guid
(
&
status
.
InterfaceGuid
));
INetworkConnectionCost_Release
(
conn_cost
);
...
...
@@ -242,104 +242,104 @@ static void test_INetworkListManager( void )
connectivity
=
0xdeadbeef
;
hr
=
INetworkListManager_GetConnectivity
(
mgr
,
&
connectivity
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
connectivity
!=
0xdeadbeef
,
"unchanged value
\n
"
);
trace
(
"GetConnectivity: %08x
\n
"
,
connectivity
);
connected
=
0xdead
;
hr
=
INetworkListManager_IsConnected
(
mgr
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
connected
==
VARIANT_TRUE
||
connected
==
VARIANT_FALSE
,
"expected boolean value
\n
"
);
connected
=
0xdead
;
hr
=
INetworkListManager_IsConnectedToInternet
(
mgr
,
&
connected
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
connected
==
VARIANT_TRUE
||
connected
==
VARIANT_FALSE
,
"expected boolean value
\n
"
);
/* INetworkCostManager is supported starting Win8 */
cost_mgr
=
NULL
;
hr
=
INetworkListManager_QueryInterface
(
mgr
,
&
IID_INetworkCostManager
,
(
void
**
)
&
cost_mgr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
broken
(
hr
==
E_NOINTERFACE
),
"got %08
l
x
\n
"
,
hr
);
if
(
cost_mgr
)
{
DWORD
cost
;
NLM_DATAPLAN_STATUS
status
;
hr
=
INetworkCostManager_GetCost
(
cost_mgr
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
cost
=
0xdeadbeef
;
hr
=
INetworkCostManager_GetCost
(
cost_mgr
,
&
cost
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
cost
!=
0xdeadbeef
,
"cost not set
\n
"
);
hr
=
INetworkCostManager_GetDataPlanStatus
(
cost_mgr
,
NULL
,
NULL
);
ok
(
hr
==
E_POINTER
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
E_POINTER
,
"got %08
l
x
\n
"
,
hr
);
hr
=
INetworkCostManager_GetDataPlanStatus
(
cost_mgr
,
&
status
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
INetworkCostManager_Release
(
cost_mgr
);
}
hr
=
INetworkListManager_QueryInterface
(
mgr
,
&
IID_IConnectionPointContainer
,
(
void
**
)
&
cpc
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ref1
=
IConnectionPointContainer_AddRef
(
cpc
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkListManagerEvents
,
&
pt
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ref2
=
IConnectionPointContainer_AddRef
(
cpc
);
ok
(
ref2
==
ref1
+
2
,
"Expected refcount %
d, got %
d
\n
"
,
ref1
+
2
,
ref2
);
ok
(
ref2
==
ref1
+
2
,
"Expected refcount %
ld, got %l
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
(
hr
==
S_OK
,
"got %08
l
x
\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
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
!
memcmp
(
&
iid
,
&
IID_INetworkListManagerEvents
,
sizeof
(
iid
)
),
"Expected iid to be IID_INetworkListManagerEvents
\n
"
);
hr
=
IConnectionPoint_Advise
(
pt
,
(
IUnknown
*
)
&
mgr_sink_unk
,
&
cookie
);
ok
(
hr
==
CO_E_FAILEDTOOPENTHREADTOKEN
,
"Advise failed: %08x
\n
"
,
hr
);
ok
(
hr
==
CO_E_FAILEDTOOPENTHREADTOKEN
,
"Advise failed: %08
l
x
\n
"
,
hr
);
hr
=
IConnectionPoint_Advise
(
pt
,
(
IUnknown
*
)
&
mgr_sink
,
&
cookie
);
ok
(
hr
==
S_OK
,
"Advise failed: %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Advise failed: %08
l
x
\n
"
,
hr
);
hr
=
IConnectionPoint_Unadvise
(
pt
,
0xdeadbeef
);
ok
(
hr
==
OLE_E_NOCONNECTION
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"Unadvise failed: %08x
\n
"
,
hr
);
ok
(
hr
==
OLE_E_NOCONNECTION
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"Unadvise failed: %08
l
x
\n
"
,
hr
);
hr
=
IConnectionPoint_Unadvise
(
pt
,
cookie
);
ok
(
hr
==
S_OK
,
"Unadvise failed: %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Unadvise failed: %08
l
x
\n
"
,
hr
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkListManagerEvents
,
&
pt2
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
ok
(
pt
==
pt2
,
"pt != pt2
\n
"
);
IConnectionPoint_Release
(
pt2
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkCostManagerEvents
,
&
pt
);
ok
(
hr
==
S_OK
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"got %08
l
x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IConnectionPoint_Release
(
pt
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkConnectionEvents
,
&
pt
);
ok
(
hr
==
S_OK
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
||
hr
==
CO_E_FAILEDTOIMPERSONATE
,
"got %08
l
x
\n
"
,
hr
);
if
(
hr
==
S_OK
)
IConnectionPoint_Release
(
pt
);
hr
=
IConnectionPointContainer_FindConnectionPoint
(
cpc
,
&
IID_INetworkEvents
,
&
pt
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
IConnectionPoint_Release
(
pt
);
IConnectionPointContainer_Release
(
cpc
);
network_iter
=
NULL
;
hr
=
INetworkListManager_GetNetworks
(
mgr
,
NLM_ENUM_NETWORK_ALL
,
&
network_iter
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
if
(
network_iter
)
{
while
((
hr
=
IEnumNetworks_Next
(
network_iter
,
1
,
&
network
,
NULL
))
==
S_OK
)
...
...
@@ -352,17 +352,17 @@ static void test_INetworkListManager( void )
conn_iter
=
NULL
;
hr
=
INetworkListManager_GetNetworkConnections
(
mgr
,
&
conn_iter
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"got %08
l
x
\n
"
,
hr
);
if
(
conn_iter
)
{
fetched
=
256
;
hr
=
IEnumNetworkConnections_Next
(
conn_iter
,
1
,
NULL
,
&
fetched
);
ok
(
hr
==
E_POINTER
,
"got hr %#x.
\n
"
,
hr
);
ok
(
fetched
==
256
,
"got wrong feteched: %d.
\n
"
,
fetched
);
ok
(
hr
==
E_POINTER
,
"got hr %#
l
x.
\n
"
,
hr
);
ok
(
fetched
==
256
,
"got wrong feteched: %
l
d.
\n
"
,
fetched
);
hr
=
IEnumNetworkConnections_Next
(
conn_iter
,
0
,
NULL
,
&
fetched
);
ok
(
hr
==
E_POINTER
,
"got hr %#x.
\n
"
,
hr
);
ok
(
fetched
==
256
,
"got wrong feteched: %d.
\n
"
,
fetched
);
ok
(
hr
==
E_POINTER
,
"got hr %#
l
x.
\n
"
,
hr
);
ok
(
fetched
==
256
,
"got wrong feteched: %
l
d.
\n
"
,
fetched
);
while
((
hr
=
IEnumNetworkConnections_Next
(
conn_iter
,
1
,
&
conn
,
NULL
))
==
S_OK
)
{
...
...
@@ -380,11 +380,11 @@ static void test_INetworkListManager( void )
ref1
=
IConnectionPoint_Release
(
pt
);
ref2
=
INetworkListManager_Release
(
mgr
);
ok
(
ref2
==
ref1
-
1
,
"ref = %u
\n
"
,
ref1
);
ok
(
ref2
==
ref1
-
1
,
"ref = %
l
u
\n
"
,
ref1
);
IConnectionPoint_Release
(
pt
);
ref1
=
IConnectionPoint_Release
(
pt
);
ok
(
!
ref1
,
"ref = %u
\n
"
,
ref1
);
ok
(
!
ref1
,
"ref = %
l
u
\n
"
,
ref1
);
}
START_TEST
(
list
)
...
...
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