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
66700489
Commit
66700489
authored
Oct 14, 2018
by
Alistair Leslie-Hughes
Committed by
Alexandre Julliard
Oct 16, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hnetcfg/tests: Add IUPnPNAT interface tests.
Signed-off-by:
Alistair Leslie-Hughes
<
leslie_alistair@hotmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d65bd95e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
policy.c
dlls/hnetcfg/tests/policy.c
+31
-0
No files found.
dlls/hnetcfg/tests/policy.c
View file @
66700489
...
...
@@ -27,6 +27,7 @@
#include "wine/test.h"
#include "netfw.h"
#include "natupnp.h"
static
void
test_policy2_rules
(
INetFwPolicy2
*
policy2
)
{
...
...
@@ -160,6 +161,35 @@ static void test_NetFwAuthorizedApplication(void)
INetFwAuthorizedApplication_Release
(
app
);
}
static
void
test_IUPnPNAT
(
void
)
{
IUPnPNAT
*
nat
;
IStaticPortMappingCollection
*
static_ports
;
IDynamicPortMappingCollection
*
dync_ports
;
INATEventManager
*
manager
;
HRESULT
hr
;
hr
=
CoCreateInstance
(
&
CLSID_UPnPNAT
,
NULL
,
CLSCTX_INPROC_SERVER
|
CLSCTX_INPROC_HANDLER
,
&
IID_IUPnPNAT
,
(
void
**
)
&
nat
);
ok
(
hr
==
S_OK
,
"got: %08x
\n
"
,
hr
);
hr
=
IUPnPNAT_get_StaticPortMappingCollection
(
nat
,
&
static_ports
);
todo_wine
ok
(
hr
==
S_OK
,
"got: %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
&&
static_ports
)
IStaticPortMappingCollection_Release
(
static_ports
);
hr
=
IUPnPNAT_get_DynamicPortMappingCollection
(
nat
,
&
dync_ports
);
ok
(
hr
==
S_OK
||
hr
==
E_NOTIMPL
/* Windows 8.1 */
,
"got: %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
&&
dync_ports
)
IDynamicPortMappingCollection_Release
(
dync_ports
);
hr
=
IUPnPNAT_get_NATEventManager
(
nat
,
&
manager
);
todo_wine
ok
(
hr
==
S_OK
,
"got: %08x
\n
"
,
hr
);
if
(
hr
==
S_OK
&&
manager
)
INATEventManager_Release
(
manager
);
IUPnPNAT_Release
(
nat
);
}
START_TEST
(
policy
)
{
INetFwMgr
*
manager
;
...
...
@@ -180,6 +210,7 @@ START_TEST(policy)
test_interfaces
();
test_NetFwAuthorizedApplication
();
test_IUPnPNAT
();
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