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
85f993ed
Commit
85f993ed
authored
Apr 11, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Apr 12, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi/tests: Add initial tests for WSDCreateDiscoveryPublisher.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c70486c5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
107 additions
and
0 deletions
+107
-0
configure
configure
+1
-0
configure.ac
configure.ac
+1
-0
Makefile.in
dlls/wsdapi/tests/Makefile.in
+5
-0
discovery.c
dlls/wsdapi/tests/discovery.c
+100
-0
No files found.
configure
View file @
85f993ed
...
...
@@ -18493,6 +18493,7 @@ wine_fn_config_dll wpcap enable_wpcap
wine_fn_config_dll ws2_32 enable_ws2_32 implib
wine_fn_config_test dlls/ws2_32/tests ws2_32_test
wine_fn_config_dll wsdapi enable_wsdapi implib
wine_fn_config_test dlls/wsdapi/tests wsdapi_test
wine_fn_config_dll wshom.ocx enable_wshom_ocx clean
wine_fn_config_test dlls/wshom.ocx/tests wshom.ocx_test clean
wine_fn_config_dll wsnmp32 enable_wsnmp32 implib
...
...
configure.ac
View file @
85f993ed
...
...
@@ -3527,6 +3527,7 @@ WINE_CONFIG_DLL(wpcap)
WINE_CONFIG_DLL(ws2_32,,[implib])
WINE_CONFIG_TEST(dlls/ws2_32/tests)
WINE_CONFIG_DLL(wsdapi,,[implib])
WINE_CONFIG_TEST(dlls/wsdapi/tests)
WINE_CONFIG_DLL(wshom.ocx,,[clean])
WINE_CONFIG_TEST(dlls/wshom.ocx/tests,[clean])
WINE_CONFIG_DLL(wsnmp32,,[implib])
...
...
dlls/wsdapi/tests/Makefile.in
0 → 100644
View file @
85f993ed
TESTDLL
=
wsdapi.dll
IMPORTS
=
wsdapi ole32 user32
C_SRCS
=
\
discovery.c
dlls/wsdapi/tests/discovery.c
0 → 100644
View file @
85f993ed
/*
* Web Services on Devices
* Discovery tests
*
* Copyright 2017 Owen Rudge for CodeWeavers
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#define COBJMACROS
#include <windows.h>
#include "wine/test.h"
#include "initguid.h"
#include "objbase.h"
#include "wsdapi.h"
static
void
CreateDiscoveryPublisher_tests
(
void
)
{
IWSDiscoveryPublisher
*
publisher
=
NULL
;
IWSDiscoveryPublisher
*
publisher2
;
IUnknown
*
unknown
;
HRESULT
rc
;
ULONG
ref
;
rc
=
WSDCreateDiscoveryPublisher
(
NULL
,
NULL
);
ok
((
rc
==
E_POINTER
)
||
(
rc
==
E_INVALIDARG
),
"WSDCreateDiscoveryPublisher(NULL, NULL) failed: %08x
\n
"
,
rc
);
rc
=
WSDCreateDiscoveryPublisher
(
NULL
,
&
publisher
);
ok
(
rc
==
S_OK
,
"WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x
\n
"
,
rc
);
ok
(
publisher
!=
NULL
,
"WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL
\n
"
);
/* Try to query for objects */
rc
=
IWSDiscoveryPublisher_QueryInterface
(
publisher
,
&
IID_IUnknown
,
(
LPVOID
*
)
&
unknown
);
ok
(
rc
==
S_OK
,
"IWSDiscoveryPublisher_QueryInterface(IID_IUnknown) failed: %08x
\n
"
,
rc
);
if
(
rc
==
S_OK
)
IUnknown_Release
(
unknown
);
rc
=
IWSDiscoveryPublisher_QueryInterface
(
publisher
,
&
IID_IWSDiscoveryPublisher
,
(
LPVOID
*
)
&
publisher2
);
ok
(
rc
==
S_OK
,
"IWSDiscoveryPublisher_QueryInterface(IID_IWSDiscoveryPublisher) failed: %08x
\n
"
,
rc
);
if
(
rc
==
S_OK
)
IWSDiscoveryPublisher_Release
(
publisher2
);
ref
=
IWSDiscoveryPublisher_Release
(
publisher
);
ok
(
ref
==
0
,
"IWSDiscoveryPublisher_Release() has %d references, should have 0
\n
"
,
ref
);
}
static
void
Publish_tests
(
void
)
{
IWSDiscoveryPublisher
*
publisher
=
NULL
;
HRESULT
rc
;
ULONG
ref
;
rc
=
WSDCreateDiscoveryPublisher
(
NULL
,
&
publisher
);
ok
(
rc
==
S_OK
,
"WSDCreateDiscoveryPublisher(NULL, &publisher) failed: %08x
\n
"
,
rc
);
ok
(
publisher
!=
NULL
,
"WSDCreateDiscoveryPublisher(NULL, &publisher) failed: publisher == NULL
\n
"
);
/* Test SetAddressFamily */
rc
=
IWSDiscoveryPublisher_SetAddressFamily
(
publisher
,
12345
);
ok
(
rc
==
E_INVALIDARG
,
"IWSDiscoveryPublisher_SetAddressFamily(12345) returned unexpected result: %08x
\n
"
,
rc
);
rc
=
IWSDiscoveryPublisher_SetAddressFamily
(
publisher
,
WSDAPI_ADDRESSFAMILY_IPV4
);
ok
(
rc
==
S_OK
,
"IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV4) failed: %08x
\n
"
,
rc
);
/* Try to update the address family after already setting it */
rc
=
IWSDiscoveryPublisher_SetAddressFamily
(
publisher
,
WSDAPI_ADDRESSFAMILY_IPV6
);
ok
(
rc
==
STG_E_INVALIDFUNCTION
,
"IWSDiscoveryPublisher_SetAddressFamily(WSDAPI_ADDRESSFAMILY_IPV6) returned unexpected result: %08x
\n
"
,
rc
);
/* TODO: Register notification sink */
/* TODO: Publish */
ref
=
IWSDiscoveryPublisher_Release
(
publisher
);
ok
(
ref
==
0
,
"IWSDiscoveryPublisher_Release() has %d references, should have 0
\n
"
,
ref
);
}
START_TEST
(
discovery
)
{
CoInitialize
(
NULL
);
CreateDiscoveryPublisher_tests
();
Publish_tests
();
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