Module: wine Branch: master Commit: 90bd74081af0d6e0849b96ec4a28dea6958ebae9 URL: http://source.winehq.org/git/wine.git/?a=commit;h=90bd74081af0d6e0849b96ec4a...
Author: Rob Shearman robertshearman@gmail.com Date: Thu Aug 14 09:14:52 2008 +0100
rpcrt4: Add test for RpcBindingToStringBindingA.
---
dlls/rpcrt4/tests/rpc.c | 30 ++++++++++++++++++++++++++++++ 1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/dlls/rpcrt4/tests/rpc.c b/dlls/rpcrt4/tests/rpc.c index 19a0a94..a32eadd 100644 --- a/dlls/rpcrt4/tests/rpc.c +++ b/dlls/rpcrt4/tests/rpc.c @@ -722,6 +722,35 @@ static void test_endpoint_mapper(void) ok(status == RPC_S_OK, "RpcBindingVectorFree failed with error %lu\n", status); }
+static void test_RpcStringBindingFromBinding(void) +{ + static unsigned char ncacn_np[] = "ncacn_np"; + static unsigned char address[] = "."; + static unsigned char endpoint[] = "\pipe\wine_rpc_test"; + RPC_STATUS status; + handle_t handle; + RPC_CSTR binding; + + status = RpcStringBindingCompose(NULL, ncacn_np, address, + endpoint, NULL, &binding); + ok(status == RPC_S_OK, "RpcStringBindingCompose failed (%lu)\n", status); + + status = RpcBindingFromStringBinding(binding, &handle); + ok(status == RPC_S_OK, "RpcBindingFromStringBinding failed (%lu)\n", status); + RpcStringFree(&binding); + + status = RpcBindingToStringBinding(handle, &binding); + ok(status == RPC_S_OK, "RpcStringBindingFromBinding failed with error %lu\n", status); + + todo_wine + ok(!strcmp((const char *)binding, "ncacn_np:.[\\pipe\\wine_rpc_test]"), + "binding string didn't match what was expected: "%s"\n", binding); + RpcStringFree(&binding); + + status = RpcBindingFree(&handle); + ok(status == RPC_S_OK, "RpcBindingFree failed with error %lu\n", status); +} + START_TEST( rpc ) { trace ( " ** Uuid Conversion and Comparison Tests **\n" ); @@ -734,4 +763,5 @@ START_TEST( rpc ) test_RpcStringBindingParseA(); test_I_RpcExceptionFilter(); test_endpoint_mapper(); + test_RpcStringBindingFromBinding(); }