Owen Rudge : wsdapi/tests: Add tests for EndpointReference, AppSequence, MetadataVersion in Hello message.

Alexandre Julliard julliard at winehq.org
Wed Mar 28 16:42:44 CDT 2018


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

Author: Owen Rudge <orudge at codeweavers.com>
Date:   Tue Mar 27 21:30:22 2018 +0100

wsdapi/tests: Add tests for EndpointReference, AppSequence, MetadataVersion in Hello message.

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 | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/dlls/wsdapi/tests/discovery.c b/dlls/wsdapi/tests/discovery.c
index 563c33c..30f90a5 100644
--- a/dlls/wsdapi/tests/discovery.c
+++ b/dlls/wsdapi/tests/discovery.c
@@ -505,8 +505,8 @@ static void Publish_tests(void)
     LPWSTR publisherIdW = NULL;
     messageStorage *msgStorage;
     WSADATA wsaData;
-    BOOL messageOK;
-    BOOL hello_message_seen = FALSE;
+    BOOL messageOK, hello_message_seen = FALSE, endpoint_reference_seen = FALSE, app_sequence_seen = FALSE;
+    BOOL metadata_version_seen = FALSE;
     int ret, i;
     HRESULT rc;
     ULONG ref;
@@ -597,9 +597,10 @@ static void Publish_tests(void)
         messageOK = FALSE;
 
         hello_message_seen = (strstr(msg, "<wsa:Action>http://schemas.xmlsoap.org/ws/2005/04/discovery/Hello</wsa:Action>") != NULL);
-        messageOK = hello_message_seen && (strstr(msg, endpointReferenceString) != NULL);
-        messageOK = messageOK && (strstr(msg, "<wsd:AppSequence InstanceId=\"1\" MessageNumber=\"1\"></wsd:AppSequence>") != NULL);
-        messageOK = messageOK && (strstr(msg, "<wsd:MetadataVersion>1</wsd:MetadataVersion>") != NULL);
+        endpoint_reference_seen = (strstr(msg, endpointReferenceString) != NULL);
+        app_sequence_seen = (strstr(msg, "<wsd:AppSequence InstanceId=\"1\" MessageNumber=\"1\"></wsd:AppSequence>") != NULL);
+        metadata_version_seen = (strstr(msg, "<wsd:MetadataVersion>1</wsd:MetadataVersion>") != NULL);
+        messageOK = hello_message_seen && endpoint_reference_seen && app_sequence_seen && metadata_version_seen;
 
         if (messageOK) break;
     }
@@ -612,6 +613,9 @@ static void Publish_tests(void)
     heap_free(msgStorage);
 
     ok(hello_message_seen == TRUE, "Hello message not received\n");
+    todo_wine ok(endpoint_reference_seen == TRUE, "EndpointReference not received\n");
+    todo_wine ok(app_sequence_seen == TRUE, "AppSequence not received\n");
+    todo_wine ok(metadata_version_seen == TRUE, "MetadataVersion not received\n");
     todo_wine ok(messageOK == TRUE, "Hello message metadata not received\n");
 
 after_publish_test:




More information about the wine-cvs mailing list