Colin Finck : rpcrt4: Add a test for RpcBindingServerFromClient (todo_wine ).

Alexandre Julliard julliard at winehq.org
Mon Aug 22 10:24:12 CDT 2016


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

Author: Colin Finck <mail at colinfinck.de>
Date:   Fri Aug 19 11:52:58 2016 +0200

rpcrt4: Add a test for RpcBindingServerFromClient (todo_wine).

Signed-off-by: Colin Finck <mail at colinfinck.de>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/rpcrt4/tests/server.c | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)

diff --git a/dlls/rpcrt4/tests/server.c b/dlls/rpcrt4/tests/server.c
index 0b31d3d..2653f7a 100644
--- a/dlls/rpcrt4/tests/server.c
+++ b/dlls/rpcrt4/tests/server.c
@@ -744,6 +744,35 @@ void __cdecl s_context_handle_test(void)
 
         pNDRSContextUnmarshall2(binding, buf, NDR_LOCAL_DATA_REPRESENTATION, &server_if2.InterfaceId, 0);
     }
+
+    binding = NULL;
+    status = RpcBindingServerFromClient(NULL, &binding);
+
+    todo_wine
+    {
+        ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
+        ok(binding != NULL, "binding is NULL\n");
+    }
+
+    if (status == RPC_S_OK && binding != NULL)
+    {
+        unsigned char* string_binding = NULL;
+        unsigned char* computer_name = NULL;
+
+        status = RpcBindingToStringBindingA(binding, &string_binding);
+
+        ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
+        ok(string_binding != NULL, "string_binding is NULL\n");
+
+        status = RpcStringBindingParseA(string_binding, NULL, NULL, &computer_name, NULL, NULL);
+
+        ok(status == RPC_S_OK, "expected RPC_S_OK got %u\n", status);
+        ok(computer_name != NULL, "computer_name is NULL\n");
+
+        RpcStringFreeA(&string_binding);
+        RpcStringFreeA(&computer_name);
+        RpcBindingFree(&binding);
+    }
 }
 
 void __cdecl s_get_numbers(int length, int size, pints_t n[])




More information about the wine-cvs mailing list