clang-format

pull/8365/head
Vijay Pai 8 years ago
parent 8d08b1d9ee
commit 96e03110db
  1. 3
      include/grpc++/impl/codegen/service_type.h
  2. 9
      src/compiler/cpp_generator.cc
  3. 25
      test/cpp/end2end/hybrid_end2end_test.cc

@ -147,8 +147,7 @@ class Service {
methods_[index].reset();
}
void MarkMethodStreamed(int index,
MethodHandler* streamed_method) {
void MarkMethodStreamed(int index, MethodHandler* streamed_method) {
GPR_CODEGEN_ASSERT(methods_[index] && methods_[index]->handler() &&
"Cannot mark an async or generic method Streamed");
methods_[index]->SetHandler(streamed_method);

@ -605,7 +605,7 @@ void PrintHeaderServerMethodAsync(Printer *printer, const Method *method,
printer->Print(*vars, "};\n");
}
void PrintHeaderServerMethodStreamedUnary(
void PrintHeaderServerMethodStreamedUnary(
Printer *printer, const Method *method,
std::map<grpc::string, grpc::string> *vars) {
(*vars)["Method"] = method->name();
@ -691,7 +691,8 @@ void PrintHeaderServerMethodSplitStreaming(
"// disable regular version of this method\n"
"::grpc::Status $Method$("
"::grpc::ServerContext* context, const $Request$* request, "
"::grpc::ServerWriter< $Response$>* writer) GRPC_FINAL GRPC_OVERRIDE {\n"
"::grpc::ServerWriter< $Response$>* writer) GRPC_FINAL GRPC_OVERRIDE "
"{\n"
" abort();\n"
" return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, \"\");\n"
"}\n");
@ -899,7 +900,7 @@ void PrintHeaderService(Printer *printer, const Service *service,
for (int i = 0; i < service->method_count(); ++i) {
(*vars)["Idx"] = as_string(i);
PrintHeaderServerMethodSplitStreaming(printer, service->method(i).get(),
vars);
vars);
}
printer->Print("typedef ");
@ -931,7 +932,7 @@ void PrintHeaderService(Printer *printer, const Service *service,
printer->Print("Service");
for (int i = 0; i < service->method_count(); ++i) {
if (service->method(i)->NoStreaming() ||
service->method(i)->ServerOnlyStreaming()) {
service->method(i)->ServerOnlyStreaming()) {
printer->Print(" >");
}
}

@ -523,12 +523,12 @@ TEST_F(HybridEnd2endTest,
// Add a second service with one sync split server streaming method.
class SplitResponseStreamDupPkg
: public duplicate::EchoTestService::WithSplitStreamingMethod_ResponseStream<
TestServiceImplDupPkg> {
: public duplicate::EchoTestService::
WithSplitStreamingMethod_ResponseStream<TestServiceImplDupPkg> {
public:
Status StreamedResponseStream(ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream)
GRPC_OVERRIDE {
Status StreamedResponseStream(
ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@ -566,9 +566,9 @@ TEST_F(HybridEnd2endTest,
class FullySplitStreamedDupPkg
: public duplicate::EchoTestService::SplitStreamedService {
public:
Status StreamedResponseStream(ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream)
GRPC_OVERRIDE {
Status StreamedResponseStream(
ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;
@ -603,8 +603,7 @@ TEST_F(HybridEnd2endTest,
}
// Add a second service that is fully server streamed
class FullyStreamedDupPkg
: public duplicate::EchoTestService::StreamedService {
class FullyStreamedDupPkg : public duplicate::EchoTestService::StreamedService {
public:
Status StreamedEcho(ServerContext* context,
ServerUnaryStreamer<EchoRequest, EchoResponse>* stream)
@ -619,9 +618,9 @@ class FullyStreamedDupPkg
GPR_ASSERT(stream->Write(resp));
return Status::OK;
}
Status StreamedResponseStream(ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream)
GRPC_OVERRIDE {
Status StreamedResponseStream(
ServerContext* context,
ServerSplitStreamer<EchoRequest, EchoResponse>* stream) GRPC_OVERRIDE {
EchoRequest req;
EchoResponse resp;
uint32_t next_msg_sz;

Loading…
Cancel
Save