Owen Rudge : wsdapi/tests: Add test for endpoint reference "any" parameter.

Alexandre Julliard julliard at winehq.org
Tue Apr 24 18:46:08 CDT 2018


Module: wine
Branch: master
Commit: e7a5fc50dcfbab8cc055b84882bdfd4a5e351877
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=e7a5fc50dcfbab8cc055b84882bdfd4a5e351877

Author: Owen Rudge <orudge at codeweavers.com>
Date:   Mon Apr 23 21:12:07 2018 +0100

wsdapi/tests: Add test for endpoint reference "any" parameter.

Signed-off-by: Owen Rudge <orudge at codeweavers.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/wsdapi/tests/discovery.c | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c
index c7fe8cf..3d88207 100644
--- a/dlls/wsdapi/tests/discovery.c
+++ b/dlls/wsdapi/tests/discovery.c
@@ -513,12 +513,13 @@ static void Publish_tests(void)
     HRESULT rc;
     ULONG ref;
     char *msg;
-    WSDXML_ELEMENT *header_any_element, *body_any_element;
+    WSDXML_ELEMENT *header_any_element, *body_any_element, *endpoint_any_element;
     WSDXML_NAME header_any_name;
     WSDXML_NAMESPACE ns;
     WCHAR header_any_name_text[] = {'B','e','e','r',0};
     static const WCHAR header_any_text[] = {'P','u','b','l','i','s','h','T','e','s','t',0};
     static const WCHAR body_any_text[] = {'B','o','d','y','T','e','s','t',0};
+    static const WCHAR endpoint_any_text[] = {'E','n','d','P','T','e','s','t',0};
     static const WCHAR uri[] = {'h','t','t','p',':','/','/','w','i','n','e','.','t','e','s','t','/',0};
     static const WCHAR prefix[] = {'w','i','n','e',0};
 
@@ -595,12 +596,16 @@ static void Publish_tests(void)
     rc = WSDXMLBuildAnyForSingleElement(&header_any_name, body_any_text, &body_any_element);
     ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
 
+    rc = WSDXMLBuildAnyForSingleElement(&header_any_name, endpoint_any_text, &endpoint_any_element);
+    ok(rc == S_OK, "WSDXMLBuildAnyForSingleElement failed with %08x\n", rc);
+
     /* Publish the service */
     rc = IWSDiscoveryPublisher_PublishEx(publisher, publisherIdW, 1, 1, 1, sequenceIdW, NULL, NULL, NULL,
-        header_any_element, NULL, NULL, NULL, body_any_element);
+        header_any_element, NULL, NULL, endpoint_any_element, body_any_element);
 
     WSDFreeLinkedMemory(header_any_element);
     WSDFreeLinkedMemory(body_any_element);
+    WSDFreeLinkedMemory(endpoint_any_element);
 
     ok(rc == S_OK, "Publish failed: %08x\n", rc);
 
@@ -617,7 +622,7 @@ static void Publish_tests(void)
     /* Verify we've received a message */
     ok(msgStorage->messageCount >= 1, "No messages received\n");
 
-    sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address></wsa:EndpointReference>", publisherId);
+    sprintf(endpointReferenceString, "<wsa:EndpointReference><wsa:Address>%s</wsa:Address><wine:Beer>EndPTest</wine:Beer></wsa:EndpointReference>", publisherId);
     sprintf(app_sequence_string, "<wsd:AppSequence InstanceId=\"1\" SequenceId=\"%s\" MessageNumber=\"1\"></wsd:AppSequence>",
         sequenceId);
 




More information about the wine-cvs mailing list