diff options
author | Vijay Pai <vpai@google.com> | 2018-02-19 22:45:47 -0800 |
---|---|---|
committer | Vijay Pai <vpai@google.com> | 2018-02-19 22:45:47 -0800 |
commit | 87e2e6a58aac78279578ee26c1625eb3eb016cce (patch) | |
tree | 0a4a9aa91dfec4e019fa787df8b45c763ab26741 /test/core/gpr | |
parent | 4258f11d88a4da003377354c40a81e5f786e25c8 (diff) |
clang-fmt
Diffstat (limited to 'test/core/gpr')
-rw-r--r-- | test/core/gpr/arena_test.cc | 8 | ||||
-rw-r--r-- | test/core/gpr/cpu_test.cc | 4 | ||||
-rw-r--r-- | test/core/gpr/mpscq_test.cc | 10 | ||||
-rw-r--r-- | test/core/gpr/spinlock_test.cc | 2 | ||||
-rw-r--r-- | test/core/gpr/sync_test.cc | 6 | ||||
-rw-r--r-- | test/core/gpr/tls_test.cc | 2 |
6 files changed, 16 insertions, 16 deletions
diff --git a/test/core/gpr/arena_test.cc b/test/core/gpr/arena_test.cc index 717052eacd..b00c014cea 100644 --- a/test/core/gpr/arena_test.cc +++ b/test/core/gpr/arena_test.cc @@ -18,9 +18,9 @@ #include "src/core/lib/gpr/arena.h" -#include <new> #include <inttypes.h> #include <string.h> +#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -28,8 +28,8 @@ #include <grpc/support/sync.h> #include "src/core/lib/gpr/string.h" -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/thd.h" #include "test/core/util/test_config.h" static void test_noop(void) { gpr_arena_destroy(gpr_arena_create(1)); } @@ -102,8 +102,8 @@ static void concurrent_test(void) { grpc_core::Thread thds[CONCURRENT_TEST_THREADS]; for (int i = 0; i < CONCURRENT_TEST_THREADS; i++) { - new (&thds[i]) grpc_core::Thread("grpc_concurrent_test", - concurrent_test_body, &args); + new (&thds[i]) + grpc_core::Thread("grpc_concurrent_test", concurrent_test_body, &args); thds[i].Start(); } diff --git a/test/core/gpr/cpu_test.cc b/test/core/gpr/cpu_test.cc index 4575fb643a..279e6e6f5a 100644 --- a/test/core/gpr/cpu_test.cc +++ b/test/core/gpr/cpu_test.cc @@ -23,9 +23,9 @@ #include <grpc/support/cpu.h> -#include <new> #include <stdio.h> #include <string.h> +#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -115,7 +115,7 @@ static void cpu_test(void) { uint32_t nthreads = ct.ncores * 3; grpc_core::Thread* thd = - static_cast<grpc_core::Thread*>(gpr_malloc(sizeof(*thd)*nthreads)); + static_cast<grpc_core::Thread*>(gpr_malloc(sizeof(*thd) * nthreads)); for (i = 0; i < nthreads; i++) { new (&thd[i]) grpc_core::Thread("grpc_cpu_test", &worker_thread, &ct); diff --git a/test/core/gpr/mpscq_test.cc b/test/core/gpr/mpscq_test.cc index bf65b2d0b9..33f93878e0 100644 --- a/test/core/gpr/mpscq_test.cc +++ b/test/core/gpr/mpscq_test.cc @@ -18,15 +18,15 @@ #include "src/core/lib/gpr/mpscq.h" -#include <new> #include <stdlib.h> +#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> #include <grpc/support/sync.h> -#include "src/core/lib/gprpp/thd.h" #include "src/core/lib/gpr/useful.h" +#include "src/core/lib/gprpp/thd.h" #include "test/core/util/test_config.h" typedef struct test_node { @@ -167,12 +167,12 @@ static void test_mt_multipop(void) { pa.start = &start; gpr_mu_init(&pa.mu); for (size_t i = 0; i < GPR_ARRAY_SIZE(pull_thds); i++) { - new (&pull_thds[i]) grpc_core::Thread("grpc_multipop_pull", - pull_thread, &pa); + new (&pull_thds[i]) + grpc_core::Thread("grpc_multipop_pull", pull_thread, &pa); pull_thds[i].Start(); } gpr_event_set(&start, (void*)1); - for (auto& pth: pull_thds) { + for (auto& pth : pull_thds) { pth.Join(); } gpr_log(GPR_DEBUG, "spins: %" PRIdPTR, pa.spins); diff --git a/test/core/gpr/spinlock_test.cc b/test/core/gpr/spinlock_test.cc index 1a3475b8f2..ac9f70f301 100644 --- a/test/core/gpr/spinlock_test.cc +++ b/test/core/gpr/spinlock_test.cc @@ -20,9 +20,9 @@ #include "src/core/lib/gpr/spinlock.h" -#include <new> #include <stdio.h> #include <stdlib.h> +#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> diff --git a/test/core/gpr/sync_test.cc b/test/core/gpr/sync_test.cc index 2cdf061c71..487f394b14 100644 --- a/test/core/gpr/sync_test.cc +++ b/test/core/gpr/sync_test.cc @@ -20,9 +20,9 @@ #include <grpc/support/sync.h> -#include <new> #include <stdio.h> #include <stdlib.h> +#include <new> #include <grpc/support/alloc.h> #include <grpc/support/log.h> @@ -164,8 +164,8 @@ struct test { static struct test* test_new(int nthreads, int64_t iterations, int incr_step) { struct test* m = static_cast<struct test*>(gpr_malloc(sizeof(*m))); m->nthreads = nthreads; - m->threads = - static_cast<grpc_core::Thread*>(gpr_malloc(sizeof(*m->threads) * nthreads)); + m->threads = static_cast<grpc_core::Thread*>( + gpr_malloc(sizeof(*m->threads) * nthreads)); m->iterations = iterations; m->counter = 0; m->thread_count = 0; diff --git a/test/core/gpr/tls_test.cc b/test/core/gpr/tls_test.cc index 15f329f21a..a060cd47f1 100644 --- a/test/core/gpr/tls_test.cc +++ b/test/core/gpr/tls_test.cc @@ -20,9 +20,9 @@ #include "src/core/lib/gpr/tls.h" -#include <new> #include <stdio.h> #include <stdlib.h> +#include <new> #include <grpc/support/log.h> #include <grpc/support/sync.h> |