aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/client_channel
diff options
context:
space:
mode:
authorGravatar Craig Tiller <ctiller@google.com>2017-11-10 15:26:57 -0800
committerGravatar Craig Tiller <ctiller@google.com>2017-11-10 15:26:57 -0800
commitbe98d248419fbb22db47e8d66b884676fdaf9238 (patch)
tree5debce1183ece30043e5f583fd704e97420eba04 /test/core/client_channel
parent6d0ec6b382550e196ebbcd61437c3669aa505ef4 (diff)
clang-format after nullptr changes
Diffstat (limited to 'test/core/client_channel')
-rw-r--r--test/core/client_channel/lb_policies_test.cc40
-rw-r--r--test/core/client_channel/parse_address_test.cc4
-rw-r--r--test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc3
3 files changed, 24 insertions, 23 deletions
diff --git a/test/core/client_channel/lb_policies_test.cc b/test/core/client_channel/lb_policies_test.cc
index 486ad2c212..5f8d3b84cc 100644
--- a/test/core/client_channel/lb_policies_test.cc
+++ b/test/core/client_channel/lb_policies_test.cc
@@ -286,9 +286,10 @@ static request_sequences perform_request(servers_fixture* f,
memset(s_valid, 0, f->num_servers * sizeof(int));
grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr");
- c = grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
- grpc_slice_from_static_string("/foo"), &host,
- gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ c = grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS,
+ f->cq, grpc_slice_from_static_string("/foo"),
+ &host, gpr_inf_future(GPR_CLOCK_REALTIME),
+ nullptr);
GPR_ASSERT(c);
completed_client = 0;
@@ -317,14 +318,14 @@ static request_sequences perform_request(servers_fixture* f,
op->flags = 0;
op->reserved = nullptr;
op++;
- GPR_ASSERT(GRPC_CALL_OK ==
- grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), nullptr));
+ GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(c, ops, (size_t)(op - ops),
+ tag(1), nullptr));
s_idx = -1;
- while (
- (ev = grpc_completion_queue_next(
- f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT), nullptr))
- .type != GRPC_QUEUE_TIMEOUT) {
+ while ((ev = grpc_completion_queue_next(
+ f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT),
+ nullptr))
+ .type != GRPC_QUEUE_TIMEOUT) {
GPR_ASSERT(ev.type == GRPC_OP_COMPLETE);
read_tag = ((int)(intptr_t)ev.tag);
const grpc_connectivity_state conn_state =
@@ -401,10 +402,10 @@ static request_sequences perform_request(servers_fixture* f,
}
}
- GPR_ASSERT(
- grpc_completion_queue_next(
- f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT), nullptr)
- .type == GRPC_QUEUE_TIMEOUT);
+ GPR_ASSERT(grpc_completion_queue_next(
+ f->cq, grpc_timeout_milliseconds_to_deadline(RETRY_TIMEOUT),
+ nullptr)
+ .type == GRPC_QUEUE_TIMEOUT);
grpc_metadata_array_destroy(&rdata->initial_metadata_recv);
grpc_metadata_array_destroy(&rdata->trailing_metadata_recv);
@@ -451,10 +452,10 @@ static grpc_call** perform_multirequest(servers_fixture* f,
grpc_slice host = grpc_slice_from_static_string("foo.test.google.fr");
for (i = 0; i < concurrent_calls; i++) {
- calls[i] =
- grpc_channel_create_call(client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
- grpc_slice_from_static_string("/foo"), &host,
- gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
+ calls[i] = grpc_channel_create_call(
+ client, nullptr, GRPC_PROPAGATE_DEFAULTS, f->cq,
+ grpc_slice_from_static_string("/foo"), &host,
+ gpr_inf_future(GPR_CLOCK_REALTIME), nullptr);
GPR_ASSERT(calls[i]);
GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(calls[i], ops,
(size_t)(op - ops), tag(1),
@@ -602,9 +603,8 @@ static void test_pending_calls(size_t concurrent_calls) {
client = create_client(f);
calls = perform_multirequest(f, client, concurrent_calls);
- grpc_call_cancel(
- calls[0],
- nullptr); /* exercise the cancel pick path whilst there are pending picks */
+ grpc_call_cancel(calls[0], nullptr); /* exercise the cancel pick path whilst
+ there are pending picks */
gpr_free(rdata.call_details);
diff --git a/test/core/client_channel/parse_address_test.cc b/test/core/client_channel/parse_address_test.cc
index 938cef309e..94f76da920 100644
--- a/test/core/client_channel/parse_address_test.cc
+++ b/test/core/client_channel/parse_address_test.cc
@@ -63,7 +63,7 @@ static void test_grpc_parse_ipv4(const char* uri_text, const char* host,
struct sockaddr_in* addr_in = (struct sockaddr_in*)addr.addr;
GPR_ASSERT(AF_INET == addr_in->sin_family);
GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET, &addr_in->sin_addr, ntop_buf,
- sizeof(ntop_buf)));
+ sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
GPR_ASSERT(ntohs(addr_in->sin_port) == port);
@@ -82,7 +82,7 @@ static void test_grpc_parse_ipv6(const char* uri_text, const char* host,
struct sockaddr_in6* addr_in6 = (struct sockaddr_in6*)addr.addr;
GPR_ASSERT(AF_INET6 == addr_in6->sin6_family);
GPR_ASSERT(nullptr != grpc_inet_ntop(AF_INET6, &addr_in6->sin6_addr, ntop_buf,
- sizeof(ntop_buf)));
+ sizeof(ntop_buf)));
GPR_ASSERT(0 == strcmp(ntop_buf, host));
GPR_ASSERT(ntohs(addr_in6->sin6_port) == port);
GPR_ASSERT(addr_in6->sin6_scope_id == scope_id);
diff --git a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
index f377abc269..dcf315eba5 100644
--- a/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
+++ b/test/core/client_channel/resolvers/dns_resolver_connectivity_test.cc
@@ -73,7 +73,8 @@ static grpc_ares_request* my_dns_lookup_ares(
} else {
gpr_mu_unlock(&g_mu);
*lb_addrs = grpc_lb_addresses_create(1, nullptr);
- grpc_lb_addresses_set_address(*lb_addrs, 0, nullptr, 0, false, nullptr, nullptr);
+ grpc_lb_addresses_set_address(*lb_addrs, 0, nullptr, 0, false, nullptr,
+ nullptr);
}
GRPC_CLOSURE_SCHED(exec_ctx, on_done, error);
return nullptr;