aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2016-03-29 07:38:27 -0700
committerGravatar Craig Tiller <ctiller@google.com>2016-03-29 07:38:27 -0700
commitca5acf819d94e8c3de4a28d0a8f6dedc3068148f (patch)
treed1cf1e0805aa928f5cc7f9d0ade546a4e9b8971e
parent8b3fb1af6a48d22ea07973741aefdf91a9799738 (diff)
Fix test by naming parameters
-rw-r--r--test/core/internal_api_canaries/iomgr.c33
1 files changed, 17 insertions, 16 deletions
diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c
index cd74ccc562..647ccb9df9 100644
--- a/test/core/internal_api_canaries/iomgr.c
+++ b/test/core/internal_api_canaries/iomgr.c
@@ -69,22 +69,6 @@ static void test_code(void) {
bool x = grpc_closure_list_empty(closure_list);
grpc_closure_next(&closure);
- /* endpoint.h */
- grpc_endpoint_read(NULL, NULL, NULL, NULL);
- grpc_endpoint_get_peer(NULL);
- grpc_endpoint_write(NULL, NULL, NULL, NULL);
- grpc_endpoint_shutdown(NULL, NULL);
- grpc_endpoint_destroy(NULL, NULL);
- grpc_endpoint_add_to_pollset(NULL, NULL, NULL);
- grpc_endpoint_add_to_pollset_set(NULL, NULL, NULL);
-
- grpc_endpoint endpoint;
- grpc_endpoint_vtable vtable = {
- grpc_endpoint_read, grpc_endpoint_write, grpc_endpoint_add_to_pollset,
- grpc_endpoint_add_to_pollset_set, grpc_endpoint_shutdown,
- grpc_endpoint_destroy, grpc_endpoint_get_peer};
- endpoint.vtable = &vtable;
-
/* exec_ctx.h */
grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT;
grpc_exec_ctx_flush(&exec_ctx);
@@ -92,6 +76,23 @@ static void test_code(void) {
grpc_exec_ctx_enqueue(&exec_ctx, &closure, x, NULL);
grpc_exec_ctx_enqueue_list(&exec_ctx, &closure_list, NULL);
+ /* endpoint.h */
+ grpc_endpoint endpoint;
+ grpc_endpoint_vtable vtable = {
+ grpc_endpoint_read, grpc_endpoint_write,
+ grpc_endpoint_add_to_pollset, grpc_endpoint_add_to_pollset_set,
+ grpc_endpoint_shutdown, grpc_endpoint_destroy,
+ grpc_endpoint_get_peer};
+ endpoint.vtable = &vtable;
+
+ grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL);
+ grpc_endpoint_get_peer(&endpoint);
+ grpc_endpoint_write(&exec_ctx, &endpoint, NULL, NULL);
+ grpc_endpoint_shutdown(&exec_ctx, &endpoint);
+ grpc_endpoint_destroy(&exec_ctx, &endpoint);
+ grpc_endpoint_add_to_pollset(&exec_ctx, &endpoint, NULL);
+ grpc_endpoint_add_to_pollset_set(&exec_ctx, &endpoint, NULL);
+
/* executor.h */
grpc_executor_init();
grpc_executor_enqueue(&closure, x);