aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_generator.h
diff options
context:
space:
mode:
authorGravatar Noah Eisen <ncteisen@google.com>2017-04-25 17:01:08 -0700
committerGravatar Noah Eisen <ncteisen@google.com>2017-04-25 17:01:08 -0700
commitf725d7e6b6ac57641e67f363f3e3b585d074f0e2 (patch)
tree08d98309e9fe0993e6fb33e79662776fc7cc5b54 /src/compiler/cpp_generator.h
parentad8d36d4dcd4deeec2d05644b78eb78ae0918f06 (diff)
parentb864e7c41c6d0363e23093fb090625f260994962 (diff)
Merge branch 'master' of https://github.com/grpc/grpc into client-auth-filter-fuzz
Diffstat (limited to 'src/compiler/cpp_generator.h')
-rw-r--r--src/compiler/cpp_generator.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h
index 69fd8a93e9..6119ebe289 100644
--- a/src/compiler/cpp_generator.h
+++ b/src/compiler/cpp_generator.h
@@ -65,6 +65,8 @@ struct Parameters {
bool use_system_headers;
// Prefix to any grpc include
grpc::string grpc_search_path;
+ // Generate GMOCK code to facilitate unit testing.
+ bool generate_mock_code;
};
// Return the prologue of the generated header file.
@@ -99,6 +101,38 @@ grpc::string GetSourceServices(grpc_generator::File *file,
grpc::string GetSourceEpilogue(grpc_generator::File *file,
const Parameters &params);
+// Return the prologue of the generated mock file.
+grpc::string GetMockPrologue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the includes needed for generated mock file.
+grpc::string GetMockIncludes(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the services for generated mock file.
+grpc::string GetMockServices(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the epilogue of generated mock file.
+grpc::string GetMockEpilogue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the prologue of the generated mock file.
+grpc::string GetMockPrologue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the includes needed for generated mock file.
+grpc::string GetMockIncludes(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the services for generated mock file.
+grpc::string GetMockServices(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the epilogue of generated mock file.
+grpc::string GetMockEpilogue(grpc_generator::File *file,
+ const Parameters &params);
+
} // namespace grpc_cpp_generator
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H