diff options
author | Mark D. Roth <roth@google.com> | 2016-11-14 12:10:04 -0800 |
---|---|---|
committer | Mark D. Roth <roth@google.com> | 2016-11-14 12:10:04 -0800 |
commit | ad1b395243a8c23de3380b0f83c909672fd45a0b (patch) | |
tree | fd8e1270f1cf23f3af769d5deeb47d36733f446e /test/core/channel | |
parent | c7d246738ba8036f5ebfcc3a9ce4e79cec0437dd (diff) | |
parent | d0670ae60bf3398b426834019df66709584d28c6 (diff) |
Merge remote-tracking branch 'upstream/master' into latency_in_final_info
Diffstat (limited to 'test/core/channel')
-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 8ef1bff22e..d3eb969f09 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -134,12 +134,26 @@ static void test_compression_algorithm_states(void) { grpc_channel_args_destroy(ch_args); } +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; } |