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
71cc41b9
Commit
71cc41b9
authored
Apr 05, 2017
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices/tests: Add listener tests.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
92fdb3ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
86 additions
and
0 deletions
+86
-0
Makefile.in
dlls/webservices/tests/Makefile.in
+1
-0
listener.c
dlls/webservices/tests/listener.c
+85
-0
No files found.
dlls/webservices/tests/Makefile.in
View file @
71cc41b9
...
...
@@ -3,6 +3,7 @@ IMPORTS = webservices user32 ws2_32
C_SRCS
=
\
channel.c
\
listener.c
\
msg.c
\
proxy.c
\
reader.c
\
...
...
dlls/webservices/tests/listener.c
0 → 100644
View file @
71cc41b9
/*
* Copyright 2017 Hans Leidekker 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
*/
#include <stdio.h>
#include "windows.h"
#include "webservices.h"
#include "wine/test.h"
static
void
test_WsCreateListener
(
void
)
{
HRESULT
hr
;
WS_LISTENER
*
listener
;
WS_CHANNEL_TYPE
type
;
WS_CHANNEL_BINDING
binding
;
WS_LISTENER_STATE
state
;
WS_IP_VERSION
version
;
ULONG
size
,
backlog
;
hr
=
WsCreateListener
(
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
WS_TCP_CHANNEL_BINDING
,
NULL
,
0
,
NULL
,
NULL
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
listener
=
NULL
;
hr
=
WsCreateListener
(
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
WS_TCP_CHANNEL_BINDING
,
NULL
,
0
,
NULL
,
&
listener
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
listener
!=
NULL
,
"listener not set
\n
"
);
backlog
=
1000
;
size
=
sizeof
(
backlog
);
hr
=
WsSetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_LISTEN_BACKLOG
,
&
backlog
,
size
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
version
=
WS_IP_VERSION_4
;
size
=
sizeof
(
version
);
hr
=
WsSetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_IP_VERSION
,
&
version
,
size
,
NULL
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
type
=
0xdeadbeef
;
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_CHANNEL_TYPE
,
&
type
,
sizeof
(
type
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
type
==
WS_CHANNEL_TYPE_DUPLEX_SESSION
,
"got %u
\n
"
,
type
);
binding
=
0xdeadbeef
;
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_CHANNEL_BINDING
,
&
binding
,
sizeof
(
binding
),
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
binding
==
WS_TCP_CHANNEL_BINDING
,
"got %u
\n
"
,
binding
);
version
=
0
;
size
=
sizeof
(
version
);
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_IP_VERSION
,
&
version
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
todo_wine
ok
(
version
==
WS_IP_VERSION_AUTO
,
"got %u
\n
"
,
version
);
state
=
0xdeadbeef
;
size
=
sizeof
(
state
);
hr
=
WsGetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_STATE
,
&
state
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
state
==
WS_LISTENER_STATE_CREATED
,
"got %u
\n
"
,
state
);
state
=
WS_LISTENER_STATE_CREATED
;
size
=
sizeof
(
state
);
hr
=
WsSetListenerProperty
(
listener
,
WS_LISTENER_PROPERTY_STATE
,
&
state
,
size
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
WsFreeListener
(
listener
);
}
START_TEST
(
listener
)
{
test_WsCreateListener
();
}
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