diff options
author | Craig Tiller <ctiller@google.com> | 2015-09-22 09:30:46 -0700 |
---|---|---|
committer | Craig Tiller <ctiller@google.com> | 2015-09-22 09:30:46 -0700 |
commit | af73d78b7838deb94673815ba3c1b0ebcadc5927 (patch) | |
tree | ca9006af480237647cada1e8b833f2d9106960b8 /test/core | |
parent | d9ccbbf6b98721f3e0256436e8a31fb378324d34 (diff) |
clang-format all core files
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/client_config/uri_parser_test.c | 2 | ||||
-rw-r--r-- | test/core/end2end/dualstack_socket_test.c | 18 | ||||
-rw-r--r-- | test/core/end2end/fixtures/h2_oauth2.c | 4 | ||||
-rw-r--r-- | test/core/end2end/fixtures/proxy.c | 4 | ||||
-rw-r--r-- | test/core/iomgr/tcp_client_posix_test.c | 13 | ||||
-rw-r--r-- | test/core/util/port_posix.c | 4 |
6 files changed, 21 insertions, 24 deletions
diff --git a/test/core/client_config/uri_parser_test.c b/test/core/client_config/uri_parser_test.c index 580c18b699..df12d6b4cb 100644 --- a/test/core/client_config/uri_parser_test.c +++ b/test/core/client_config/uri_parser_test.c @@ -41,7 +41,7 @@ static void test_succeeds(const char *uri_text, const char *scheme, const char *authority, const char *path, - const char *query, const char* fragment) { + const char *query, const char *fragment) { grpc_uri *uri = grpc_uri_parse(uri_text, 0); GPR_ASSERT(uri); GPR_ASSERT(0 == strcmp(scheme, uri->scheme)); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index fec9667db8..ec98cf39b4 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -125,7 +125,7 @@ void test_connect(const char *server_host, const char *client_host, int port, gpr_slice_new((char *)client_host, strlen(client_host), do_nothing); gpr_slice_buffer_init(&uri_parts); gpr_slice_split(uri_slice, ",", &uri_parts); - hosts_with_port = gpr_malloc(sizeof(char*) * uri_parts.count); + hosts_with_port = gpr_malloc(sizeof(char *) * uri_parts.count); for (i = 0; i < uri_parts.count; i++) { char *uri_part_str = gpr_dump_slice(uri_parts.slices[i], GPR_DUMP_ASCII); gpr_asprintf(&hosts_with_port[i], "%s:%d", uri_part_str, port); @@ -322,19 +322,19 @@ int main(int argc, char **argv) { if (!external_dns_works("loopback46.unittest.grpc.io")) { gpr_log(GPR_INFO, "Skipping tests that depend on *.unittest.grpc.io."); } else { - test_connect("loopback46.unittest.grpc.io", - "loopback4.unittest.grpc.io", 0, 1); - test_connect("loopback4.unittest.grpc.io", - "loopback46.unittest.grpc.io", 0, 1); + test_connect("loopback46.unittest.grpc.io", "loopback4.unittest.grpc.io", + 0, 1); + test_connect("loopback4.unittest.grpc.io", "loopback46.unittest.grpc.io", + 0, 1); if (do_ipv6) { test_connect("loopback46.unittest.grpc.io", "loopback6.unittest.grpc.io", 0, 1); test_connect("loopback6.unittest.grpc.io", "loopback46.unittest.grpc.io", 0, 1); - test_connect("loopback4.unittest.grpc.io", - "loopback6.unittest.grpc.io", 0, 0); - test_connect("loopback6.unittest.grpc.io", - "loopback4.unittest.grpc.io", 0, 0); + test_connect("loopback4.unittest.grpc.io", "loopback6.unittest.grpc.io", + 0, 0); + test_connect("loopback6.unittest.grpc.io", "loopback4.unittest.grpc.io", + 0, 0); } } } diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index e61e276fff..b4b2e02684 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -67,9 +67,7 @@ static const grpc_metadata *find_metadata(const grpc_metadata *md, return NULL; } -typedef struct { - size_t pseudo_refcount; -} test_processor_state; +typedef struct { size_t pseudo_refcount; } test_processor_state; static void process_oauth2_success(void *state, grpc_auth_context *ctx, const grpc_metadata *md, size_t md_count, diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index b793358653..434e75dd15 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -157,9 +157,7 @@ static void unrefpc(proxy_call *pc, const char *reason) { } } -static void refpc(proxy_call *pc, const char *reason) { - gpr_ref(&pc->refs); -} +static void refpc(proxy_call *pc, const char *reason) { gpr_ref(&pc->refs); } static void on_c2p_sent_initial_metadata(void *arg, int success) { proxy_call *pc = arg; diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index 436e5cf7df..250b071fc1 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -227,16 +227,17 @@ void test_times_out(void) { gpr_timespec continue_verifying_time = gpr_time_from_seconds(5, GPR_TIMESPAN); gpr_timespec grace_time = gpr_time_from_seconds(3, GPR_TIMESPAN); - gpr_timespec finish_time = gpr_time_add(connect_deadline, continue_verifying_time); - gpr_timespec restart_verifying_time = gpr_time_add(connect_deadline, grace_time); + gpr_timespec finish_time = + gpr_time_add(connect_deadline, continue_verifying_time); + gpr_timespec restart_verifying_time = + gpr_time_add(connect_deadline, grace_time); int is_after_deadline = gpr_time_cmp(now, connect_deadline) > 0; if (gpr_time_cmp(now, finish_time) > 0) { break; } - gpr_log(GPR_DEBUG, "now=%d.%09d connect_deadline=%d.%09d", - now.tv_sec, now.tv_nsec, connect_deadline.tv_sec, connect_deadline.tv_nsec); - if (is_after_deadline && - gpr_time_cmp(now, restart_verifying_time) <= 0) { + gpr_log(GPR_DEBUG, "now=%d.%09d connect_deadline=%d.%09d", now.tv_sec, + now.tv_nsec, connect_deadline.tv_sec, connect_deadline.tv_nsec); + if (is_after_deadline && gpr_time_cmp(now, restart_verifying_time) <= 0) { /* allow some slack before insisting that things be done */ } else { GPR_ASSERT(g_connections_complete == diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index 1987700139..602af23c15 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -127,7 +127,7 @@ static void free_port_using_server(char *server, int port) { gpr_free(path); } -static void free_chosen_ports() { +static void free_chosen_ports() { char *env = gpr_getenv("GRPC_TEST_PORT_SERVER"); if (env != NULL) { size_t i; @@ -137,7 +137,7 @@ static void free_chosen_ports() { gpr_free(env); } - gpr_free(chosen_ports); + gpr_free(chosen_ports); } static void chose_port(int port) { |