diff options
author | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2016-11-16 15:25:00 -0800 |
commit | c586666cbdfc5b5f2a3306892f8b4491862c5aba (patch) | |
tree | 924f3f760a489ccf7c6c70307b72d1753aedbdf3 /test/core/channel/channel_args_test.c | |
parent | 7cdad96fc49090eb5e3a12a7cca5a9f257d3f301 (diff) | |
parent | 1dc9ad33273e090a1c7ffa05991dc8ccc2badee6 (diff) |
Merge github.com:grpc/grpc into slice_with_exec_ctx
Diffstat (limited to 'test/core/channel/channel_args_test.c')
-rw-r--r-- | test/core/channel/channel_args_test.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index 261d0c5916..6a325bc12f 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -141,12 +141,26 @@ static void test_compression_algorithm_states(void) { grpc_exec_ctx_finish(&exec_ctx); } +static void test_set_socket_mutator(void) { + grpc_channel_args *ch_args; + grpc_socket_mutator mutator; + grpc_socket_mutator_init(&mutator, NULL); + + ch_args = grpc_channel_args_set_socket_mutator(NULL, &mutator); + GPR_ASSERT(ch_args->num_args == 1); + GPR_ASSERT(strcmp(ch_args->args[0].key, GRPC_ARG_SOCKET_MUTATOR) == 0); + GPR_ASSERT(ch_args->args[0].type == GRPC_ARG_POINTER); + + grpc_channel_args_destroy(ch_args); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_create(); test_set_compression_algorithm(); test_compression_algorithm_states(); + test_set_socket_mutator(); grpc_shutdown(); return 0; } |