aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/channel/channel_stack_builder_test.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/core/channel/channel_stack_builder_test.c')
-rw-r--r--test/core/channel/channel_stack_builder_test.c60
1 files changed, 30 insertions, 30 deletions
diff --git a/test/core/channel/channel_stack_builder_test.c b/test/core/channel/channel_stack_builder_test.c
index 682efd1438..2a5920c673 100644
--- a/test/core/channel/channel_stack_builder_test.c
+++ b/test/core/channel/channel_stack_builder_test.c
@@ -29,30 +29,30 @@
#include "src/core/lib/surface/channel_init.h"
#include "test/core/util/test_config.h"
-static grpc_error *channel_init_func(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem,
- grpc_channel_element_args *args) {
+static grpc_error* channel_init_func(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem,
+ grpc_channel_element_args* args) {
return GRPC_ERROR_NONE;
}
-static grpc_error *call_init_func(grpc_exec_ctx *exec_ctx,
- grpc_call_element *elem,
- const grpc_call_element_args *args) {
+static grpc_error* call_init_func(grpc_exec_ctx* exec_ctx,
+ grpc_call_element* elem,
+ const grpc_call_element_args* args) {
return GRPC_ERROR_NONE;
}
-static void channel_destroy_func(grpc_exec_ctx *exec_ctx,
- grpc_channel_element *elem) {}
+static void channel_destroy_func(grpc_exec_ctx* exec_ctx,
+ grpc_channel_element* elem) {}
-static void call_destroy_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- const grpc_call_final_info *final_info,
- grpc_closure *ignored) {}
+static void call_destroy_func(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
+ const grpc_call_final_info* final_info,
+ grpc_closure* ignored) {}
-static void call_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem,
- grpc_transport_stream_op_batch *op) {}
+static void call_func(grpc_exec_ctx* exec_ctx, grpc_call_element* elem,
+ grpc_transport_stream_op_batch* op) {}
-static void channel_func(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem,
- grpc_transport_op *op) {
+static void channel_func(grpc_exec_ctx* exec_ctx, grpc_channel_element* elem,
+ grpc_transport_op* op) {
if (op->disconnect_with_error != GRPC_ERROR_NONE) {
GRPC_ERROR_UNREF(op->disconnect_with_error);
}
@@ -61,16 +61,16 @@ static void channel_func(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem,
bool g_replacement_fn_called = false;
bool g_original_fn_called = false;
-void set_arg_once_fn(grpc_channel_stack *channel_stack,
- grpc_channel_element *elem, void *arg) {
- bool *called = arg;
+void set_arg_once_fn(grpc_channel_stack* channel_stack,
+ grpc_channel_element* elem, void* arg) {
+ bool* called = arg;
// Make sure this function is only called once per arg.
GPR_ASSERT(*called == false);
*called = true;
}
static void test_channel_stack_builder_filter_replace(void) {
- grpc_channel *channel =
+ grpc_channel* channel =
grpc_insecure_channel_create("target name isn't used", NULL, NULL);
GPR_ASSERT(channel != NULL);
// Make sure the high priority filter has been created.
@@ -106,10 +106,10 @@ const grpc_channel_filter original_filter = {
grpc_channel_next_get_info,
"filter_name"};
-static bool add_replacement_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder,
- void *arg) {
- const grpc_channel_filter *filter = arg;
+static bool add_replacement_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder,
+ void* arg) {
+ const grpc_channel_filter* filter = arg;
// Get rid of any other version of the filter, as determined by having the
// same name.
GPR_ASSERT(grpc_channel_stack_builder_remove_filter(builder, filter->name));
@@ -117,26 +117,26 @@ static bool add_replacement_filter(grpc_exec_ctx *exec_ctx,
builder, filter, set_arg_once_fn, &g_replacement_fn_called);
}
-static bool add_original_filter(grpc_exec_ctx *exec_ctx,
- grpc_channel_stack_builder *builder,
- void *arg) {
+static bool add_original_filter(grpc_exec_ctx* exec_ctx,
+ grpc_channel_stack_builder* builder,
+ void* arg) {
return grpc_channel_stack_builder_prepend_filter(
- builder, (const grpc_channel_filter *)arg, set_arg_once_fn,
+ builder, (const grpc_channel_filter*)arg, set_arg_once_fn,
&g_original_fn_called);
}
static void init_plugin(void) {
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
add_original_filter,
- (void *)&original_filter);
+ (void*)&original_filter);
grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX,
add_replacement_filter,
- (void *)&replacement_filter);
+ (void*)&replacement_filter);
}
static void destroy_plugin(void) {}
-int main(int argc, char **argv) {
+int main(int argc, char** argv) {
grpc_test_init(argc, argv);
grpc_register_plugin(init_plugin, destroy_plugin);
grpc_init();