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
d0abe772
Commit
d0abe772
authored
Jun 20, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Jun 26, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi/tests: Add tests for CreateUdpMessageParameters.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
240c7038
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
77 additions
and
0 deletions
+77
-0
Makefile.in
dlls/wsdapi/tests/Makefile.in
+1
-0
msgparams.c
dlls/wsdapi/tests/msgparams.c
+76
-0
No files found.
dlls/wsdapi/tests/Makefile.in
View file @
d0abe772
...
...
@@ -5,4 +5,5 @@ C_SRCS = \
address.c
\
discovery.c
\
memory.c
\
msgparams.c
\
xml.c
dlls/wsdapi/tests/msgparams.c
0 → 100644
View file @
d0abe772
/*
* Web Services on Devices
* Message Parameters 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 <winsock2.h>
#include <windows.h>
#include "wine/test.h"
#include "objbase.h"
#include "wsdapi.h"
static
void
CreateUdpMessageParameters_tests
(
void
)
{
IWSDUdpMessageParameters
*
udpMessageParams
=
NULL
,
*
udpMessageParams2
=
NULL
;
IWSDMessageParameters
*
messageParams
=
NULL
;
IUnknown
*
unknown
;
HRESULT
rc
;
ULONG
ref
;
rc
=
WSDCreateUdpMessageParameters
(
NULL
);
ok
((
rc
==
E_POINTER
)
||
(
rc
==
E_INVALIDARG
),
"WSDCreateUdpMessageParameters(NULL) failed: %08x
\n
"
,
rc
);
rc
=
WSDCreateUdpMessageParameters
(
&
udpMessageParams
);
ok
(
rc
==
S_OK
,
"WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: %08x
\n
"
,
rc
);
ok
(
udpMessageParams
!=
NULL
,
"WSDCreateUdpMessageParameters(NULL, &udpMessageParams) failed: udpMessageParams == NULL
\n
"
);
/* Try to query for objects */
rc
=
IWSDUdpMessageParameters_QueryInterface
(
udpMessageParams
,
&
IID_IWSDUdpMessageParameters
,
(
LPVOID
*
)
&
udpMessageParams2
);
ok
(
rc
==
S_OK
,
"IWSDUdpMessageParams_QueryInterface(IID_IWSDUdpMessageParameters) failed: %08x
\n
"
,
rc
);
if
(
rc
==
S_OK
)
IWSDUdpMessageParameters_Release
(
udpMessageParams2
);
rc
=
IWSDUdpMessageParameters_QueryInterface
(
udpMessageParams
,
&
IID_IWSDMessageParameters
,
(
LPVOID
*
)
&
messageParams
);
ok
(
rc
==
S_OK
,
"IWSDUdpMessageParams_QueryInterface(IID_WSDMessageParameters) failed: %08x
\n
"
,
rc
);
if
(
rc
==
S_OK
)
IWSDMessageParameters_Release
(
messageParams
);
rc
=
IWSDUdpMessageParameters_QueryInterface
(
udpMessageParams
,
&
IID_IUnknown
,
(
LPVOID
*
)
&
unknown
);
ok
(
rc
==
S_OK
,
"IWSDUdpMessageParams_QueryInterface(IID_IUnknown) failed: %08x
\n
"
,
rc
);
if
(
rc
==
S_OK
)
IUnknown_Release
(
unknown
);
ref
=
IWSDUdpMessageParameters_Release
(
udpMessageParams
);
ok
(
ref
==
0
,
"IWSDUdpMessageParameters_Release() has %d references, should have 0
\n
"
,
ref
);
}
START_TEST
(
msgparams
)
{
CoInitialize
(
NULL
);
CreateUdpMessageParameters_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