From 3cdd9bbdbce1f460254b7117ebb7cff67146d5d1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 15 May 2015 14:43:47 -0700 Subject: [PATCH] clang-format --- test/cpp/end2end/crash_test.cc | 10 ++++++---- test/cpp/end2end/crash_test_server.cc | 1 - test/cpp/util/subprocess.cc | 25 +++++++++---------------- test/cpp/util/subprocess.h | 14 +++++++------- 4 files changed, 22 insertions(+), 28 deletions(-) diff --git a/test/cpp/end2end/crash_test.cc b/test/cpp/end2end/crash_test.cc index 91370edcd4c..10f4944b547 100644 --- a/test/cpp/end2end/crash_test.cc +++ b/test/cpp/end2end/crash_test.cc @@ -73,15 +73,17 @@ class CrashTest : public ::testing::Test { protected: CrashTest() {} - std::unique_ptr CreateServerAndStub() { + std::unique_ptr + CreateServerAndStub() { auto port = grpc_pick_unused_port_or_die(); auto addr = (std::ostringstream() << "localhost:" << port).str(); server_.reset(new SubProcess({ - (std::ostringstream() << g_root << "/crash_test_server").str(), - (std::ostringstream() << "--address=" << addr).str(), + (std::ostringstream() << g_root << "/crash_test_server").str(), + (std::ostringstream() << "--address=" << addr).str(), })); GPR_ASSERT(server_); - return grpc::cpp::test::util::TestService::NewStub(CreateChannel(addr, InsecureCredentials(), ChannelArguments())); + return grpc::cpp::test::util::TestService::NewStub( + CreateChannel(addr, InsecureCredentials(), ChannelArguments())); } void KillServer() { diff --git a/test/cpp/end2end/crash_test_server.cc b/test/cpp/end2end/crash_test_server.cc index b6b30a52046..1f8f5331996 100644 --- a/test/cpp/end2end/crash_test_server.cc +++ b/test/cpp/end2end/crash_test_server.cc @@ -83,7 +83,6 @@ void RunServer() { std::cout << "Server listening on " << FLAGS_address << std::endl; server->Wait(); } - } } diff --git a/test/cpp/util/subprocess.cc b/test/cpp/util/subprocess.cc index ae4334fa54a..d758f629acc 100644 --- a/test/cpp/util/subprocess.cc +++ b/test/cpp/util/subprocess.cc @@ -40,27 +40,20 @@ namespace grpc { static gpr_subprocess *MakeProcess(std::initializer_list args) { - std::vector vargs; - for (auto it = args.begin(); it != args.end(); ++it) { - vargs.push_back(it->c_str()); - } - return gpr_subprocess_create(vargs.size(), &vargs[0]); + std::vector vargs; + for (auto it = args.begin(); it != args.end(); ++it) { + vargs.push_back(it->c_str()); + } + return gpr_subprocess_create(vargs.size(), &vargs[0]); } SubProcess::SubProcess(std::initializer_list args) - : subprocess_(MakeProcess(args)) { -} + : subprocess_(MakeProcess(args)) {} -SubProcess::~SubProcess() { - gpr_subprocess_destroy(subprocess_); -} +SubProcess::~SubProcess() { gpr_subprocess_destroy(subprocess_); } -int SubProcess::Join() { - return gpr_subprocess_join(subprocess_); -} +int SubProcess::Join() { return gpr_subprocess_join(subprocess_); } -void SubProcess::Interrupt() { - gpr_subprocess_interrupt(subprocess_); -} +void SubProcess::Interrupt() { gpr_subprocess_interrupt(subprocess_); } } // namespace grpc \ No newline at end of file diff --git a/test/cpp/util/subprocess.h b/test/cpp/util/subprocess.h index 02cce578f88..8fafe3d1772 100644 --- a/test/cpp/util/subprocess.h +++ b/test/cpp/util/subprocess.h @@ -43,17 +43,17 @@ namespace grpc { class SubProcess { public: - SubProcess(std::initializer_list args); - ~SubProcess(); + SubProcess(std::initializer_list args); + ~SubProcess(); - int Join(); - void Interrupt(); + int Join(); + void Interrupt(); private: - SubProcess(const SubProcess& other); - SubProcess& operator=(const SubProcess& other); + SubProcess(const SubProcess& other); + SubProcess& operator=(const SubProcess& other); - gpr_subprocess *const subprocess_; + gpr_subprocess* const subprocess_; }; } // namespace grpc