Module: wine Branch: master Commit: 17b212a5c2db6281c63192e1ab4b30e7bf3c948c URL: https://gitlab.winehq.org/wine/wine/-/commit/17b212a5c2db6281c63192e1ab4b30e...
Author: Alex Henrie alexhenrie24@gmail.com Date: Mon Jul 17 22:56:55 2023 -0600
webservices/tests: Use WS_STRING_VALUE and WS_XML_STRING_VALUE.
---
dlls/webservices/tests/channel.c | 2 +- dlls/webservices/tests/msg.c | 4 ++-- dlls/webservices/tests/proxy.c | 22 +++++++++++----------- dlls/webservices/tests/reader.c | 6 +++--- 4 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/dlls/webservices/tests/channel.c b/dlls/webservices/tests/channel.c index 7e0a9becbc5..4cf39c10732 100644 --- a/dlls/webservices/tests/channel.c +++ b/dlls/webservices/tests/channel.c @@ -403,7 +403,7 @@ static void test_WsCreateChannelForListener(void)
static void test_WsResetListener(void) { - WS_STRING url = { ARRAY_SIZE( L"net.tcp://+:2017/path" ) - 1, (WCHAR *)L"net.tcp://+:2017/path" }; + static const WS_STRING url = WS_STRING_VALUE( L"net.tcp://+:2017/path" ); WS_LISTENER *listener; WS_LISTENER_STATE state; WS_LISTENER_PROPERTY prop; diff --git a/dlls/webservices/tests/msg.c b/dlls/webservices/tests/msg.c index b1c0237dc3f..bf9c700a931 100644 --- a/dlls/webservices/tests/msg.c +++ b/dlls/webservices/tests/msg.c @@ -1206,8 +1206,8 @@ static void test_WsReadBody(void) "<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/%5C%22%3E<s:Body>" "<s:Fault><faultcode>s:Client</faultcode><faultstring>OLS Exception</faultstring></s:Fault>" "</s:Body></s:Envelope>"; - static const WS_XML_STRING faultcode = { 6, (BYTE *)"Client" }; - static const WS_STRING faultstring = { 13, (WCHAR *)L"OLS Exception" }; + static const WS_XML_STRING faultcode = WS_XML_STRING_VALUE( "Client" ); + static const WS_STRING faultstring = WS_STRING_VALUE( L"OLS Exception" ); WS_HEAP *heap; WS_MESSAGE *msg, *msg2, *msg3; WS_XML_READER *reader; diff --git a/dlls/webservices/tests/proxy.c b/dlls/webservices/tests/proxy.c index 59d571fb5c3..89046acd859 100644 --- a/dlls/webservices/tests/proxy.c +++ b/dlls/webservices/tests/proxy.c @@ -812,17 +812,17 @@ static const char resp_test5[] =
static void test_fault_response( int port ) { - WS_XML_STRING faultcode = {6, (BYTE *)"Client"}; - WS_STRING faultstring = {13, (WCHAR *)L"OLS Exception"}; - WS_XML_STRING req = {3, (BYTE *)"req"}; - WS_XML_STRING resp = {4, (BYTE *)"resp"}; - WS_XML_STRING req_action = {9, (BYTE *)"req_test5"}; - WS_XML_STRING resp_action = {10, (BYTE *)"resp_test5"}; - WS_XML_STRING req_elem = {9, (BYTE *)"req_test5"}; - WS_XML_STRING resp_elem = {10, (BYTE *)"resp_test5"}; - WS_XML_STRING ns = {2, (BYTE *)"ns"}; - WS_XML_STRING ns2 = {0, (BYTE *)""}; - WS_XML_STRING val = {3, (BYTE *)"val"}; + static const WS_XML_STRING faultcode = WS_XML_STRING_VALUE( "Client" ); + static const WS_STRING faultstring = WS_STRING_VALUE( L"OLS Exception" ); + WS_XML_STRING req = WS_XML_STRING_VALUE( "req" ); + WS_XML_STRING resp = WS_XML_STRING_VALUE( "resp" ); + WS_XML_STRING req_action = WS_XML_STRING_VALUE( "req_test5" ); + WS_XML_STRING resp_action = WS_XML_STRING_VALUE( "resp_test5" ); + WS_XML_STRING req_elem = WS_XML_STRING_VALUE( "req_test5" ); + WS_XML_STRING resp_elem = WS_XML_STRING_VALUE( "resp_test5" ); + WS_XML_STRING ns = WS_XML_STRING_VALUE( "ns" ); + WS_XML_STRING ns2 = WS_XML_STRING_VALUE( "" ); + WS_XML_STRING val = WS_XML_STRING_VALUE( "val" ); HRESULT hr; WS_SERVICE_PROXY *proxy; WS_FIELD_DESCRIPTION f, *fields[1]; diff --git a/dlls/webservices/tests/reader.c b/dlls/webservices/tests/reader.c index 64acc4fcfc0..3f83c66d962 100644 --- a/dlls/webservices/tests/reader.c +++ b/dlls/webservices/tests/reader.c @@ -7144,11 +7144,11 @@ static void test_description_type(void)
static void test_WsAddErrorString(void) { + static const WS_STRING emptystr = { 0 }; + static const WS_STRING str1 = WS_STRING_VALUE( L"str1" ); + static const WS_STRING str2 = WS_STRING_VALUE( L"str2" ); ULONG count; WS_ERROR *error; - WS_STRING emptystr = { 0 }; - WS_STRING str1 = { 4, (WCHAR *) L"str1" }; - WS_STRING str2 = { 4, (WCHAR *) L"str2" }; WS_STRING out; HRESULT hr;