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
1f79f363
Commit
1f79f363
authored
Apr 13, 2016
by
Hans Leidekker
Committed by
Alexandre Julliard
Apr 13, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
webservices/tests: Add channel tests.
Signed-off-by:
Hans Leidekker
<
hans@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
5f5c3890
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
64 additions
and
0 deletions
+64
-0
Makefile.in
dlls/webservices/tests/Makefile.in
+1
-0
channel.c
dlls/webservices/tests/channel.c
+63
-0
No files found.
dlls/webservices/tests/Makefile.in
View file @
1f79f363
...
...
@@ -2,5 +2,6 @@ TESTDLL = webservices.dll
IMPORTS
=
webservices
C_SRCS
=
\
channel.c
\
reader.c
\
writer.c
dlls/webservices/tests/channel.c
0 → 100644
View file @
1f79f363
/*
* Copyright 2016 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_WsCreateChannel
(
void
)
{
HRESULT
hr
;
WS_CHANNEL
*
channel
;
WS_CHANNEL_STATE
state
;
ULONG
size
,
value
;
hr
=
WsCreateChannel
(
WS_CHANNEL_TYPE_REQUEST
,
WS_HTTP_CHANNEL_BINDING
,
NULL
,
0
,
NULL
,
NULL
,
NULL
)
;
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
channel
=
NULL
;
hr
=
WsCreateChannel
(
WS_CHANNEL_TYPE_REQUEST
,
WS_HTTP_CHANNEL_BINDING
,
NULL
,
0
,
NULL
,
&
channel
,
NULL
)
;
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
channel
!=
NULL
,
"channel not set
\n
"
);
value
=
0xdeadbeef
;
size
=
sizeof
(
value
);
hr
=
WsGetChannelProperty
(
channel
,
WS_CHANNEL_PROPERTY_MAX_BUFFERED_MESSAGE_SIZE
,
&
value
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
value
==
65536
,
"got %u
\n
"
,
value
);
/* read-only property */
state
=
0xdeadbeef
;
size
=
sizeof
(
state
);
hr
=
WsGetChannelProperty
(
channel
,
WS_CHANNEL_PROPERTY_STATE
,
&
state
,
size
,
NULL
);
ok
(
hr
==
S_OK
,
"got %08x
\n
"
,
hr
);
ok
(
state
==
WS_CHANNEL_STATE_CREATED
,
"got %u
\n
"
,
state
);
state
=
WS_CHANNEL_STATE_CREATED
;
size
=
sizeof
(
state
);
hr
=
WsSetChannelProperty
(
channel
,
WS_CHANNEL_PROPERTY_STATE
,
&
state
,
size
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"got %08x
\n
"
,
hr
);
WsFreeChannel
(
channel
);
}
START_TEST
(
channel
)
{
test_WsCreateChannel
();
}
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