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
52968831
Commit
52968831
authored
Jun 03, 2017
by
Owen Rudge
Committed by
Alexandre Julliard
Jun 05, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wsdapi/tests: Add tests for Get/SetMessageType.
Signed-off-by:
Owen Rudge
<
orudge@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
d0291c27
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
0 deletions
+42
-0
address.c
dlls/wsdapi/tests/address.c
+42
-0
No files found.
dlls/wsdapi/tests/address.c
View file @
52968831
...
@@ -180,6 +180,47 @@ static void GetSetPort_udp_tests(void)
...
@@ -180,6 +180,47 @@ static void GetSetPort_udp_tests(void)
ok
(
ret
==
0
,
"IWSDUdpAddress_Release() has %d references, should have 0
\n
"
,
ret
);
ok
(
ret
==
0
,
"IWSDUdpAddress_Release() has %d references, should have 0
\n
"
,
ret
);
}
}
static
void
GetSetMessageType_udp_tests
(
void
)
{
WSDUdpMessageType
expectedMessageType1
=
TWO_WAY
;
WSDUdpMessageType
expectedMessageType2
=
ONE_WAY
;
WSDUdpMessageType
actualMessageType
=
0
;
IWSDUdpAddress
*
udpAddress
=
NULL
;
HRESULT
rc
;
int
ret
;
rc
=
WSDCreateUdpAddress
(
&
udpAddress
);
ok
(
rc
==
S_OK
,
"WSDCreateUdpAddress(NULL, &udpAddress) failed: %08x
\n
"
,
rc
);
ok
(
udpAddress
!=
NULL
,
"WSDCreateUdpAddress(NULL, &udpAddress) failed: udpAddress == NULL
\n
"
);
rc
=
IWSDUdpAddress_GetMessageType
(
udpAddress
,
NULL
);
todo_wine
ok
(
rc
==
E_POINTER
,
"GetMessageType returned unexpected result: %08x
\n
"
,
rc
);
rc
=
IWSDUdpAddress_GetMessageType
(
udpAddress
,
&
actualMessageType
);
todo_wine
ok
(
rc
==
S_OK
,
"GetMessageType returned unexpected result: %08x
\n
"
,
rc
);
ok
(
actualMessageType
==
0
,
"GetMessageType returned unexpected message type: %d
\n
"
,
actualMessageType
);
/* Try setting a message type */
rc
=
IWSDUdpAddress_SetMessageType
(
udpAddress
,
expectedMessageType1
);
todo_wine
ok
(
rc
==
S_OK
,
"SetMessageType returned unexpected result: %08x
\n
"
,
rc
);
rc
=
IWSDUdpAddress_GetMessageType
(
udpAddress
,
&
actualMessageType
);
todo_wine
ok
(
rc
==
S_OK
,
"GetMessageType returned unexpected result: %08x
\n
"
,
rc
);
todo_wine
ok
(
actualMessageType
==
expectedMessageType1
,
"GetMessageType returned unexpected message type: %d
\n
"
,
actualMessageType
);
/* Set another one */
rc
=
IWSDUdpAddress_SetMessageType
(
udpAddress
,
expectedMessageType2
);
todo_wine
ok
(
rc
==
S_OK
,
"SetMessageType returned unexpected result: %08x
\n
"
,
rc
);
rc
=
IWSDUdpAddress_GetMessageType
(
udpAddress
,
&
actualMessageType
);
todo_wine
ok
(
rc
==
S_OK
,
"GetMessageType returned unexpected result: %08x
\n
"
,
rc
);
ok
(
actualMessageType
==
expectedMessageType2
,
"GetMessageType returned unexpected message type: %d
\n
"
,
actualMessageType
);
/* Release the object */
ret
=
IWSDUdpAddress_Release
(
udpAddress
);
ok
(
ret
==
0
,
"IWSDUdpAddress_Release() has %d references, should have 0
\n
"
,
ret
);
}
START_TEST
(
address
)
START_TEST
(
address
)
{
{
CoInitialize
(
NULL
);
CoInitialize
(
NULL
);
...
@@ -187,6 +228,7 @@ START_TEST(address)
...
@@ -187,6 +228,7 @@ START_TEST(address)
CreateUdpAddress_tests
();
CreateUdpAddress_tests
();
GetSetTransportAddress_udp_tests
();
GetSetTransportAddress_udp_tests
();
GetSetPort_udp_tests
();
GetSetPort_udp_tests
();
GetSetMessageType_udp_tests
();
CoUninitialize
();
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