aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/test_plugin.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/google/protobuf/compiler/test_plugin.cc')
-rw-r--r--src/google/protobuf/compiler/test_plugin.cc17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/test_plugin.cc b/src/google/protobuf/compiler/test_plugin.cc
index c676ce8c..4b758764 100644
--- a/src/google/protobuf/compiler/test_plugin.cc
+++ b/src/google/protobuf/compiler/test_plugin.cc
@@ -38,13 +38,24 @@
#include <google/protobuf/compiler/plugin.h>
#include <google/protobuf/compiler/mock_code_generator.h>
+namespace google {
+namespace protobuf {
+namespace compiler {
+
+int ProtobufMain(int argc, char* argv[]) {
+ MockCodeGenerator generator("test_plugin");
+ return PluginMain(argc, argv, &generator);
+}
+
+} // namespace compiler
+} // namespace protobuf
+} // namespace google
+
int main(int argc, char* argv[]) {
#ifdef _MSC_VER
// Don't print a silly message or stick a modal dialog box in my face,
// please.
_set_abort_behavior(0, ~0);
#endif // !_MSC_VER
-
- google::protobuf::compiler::MockCodeGenerator generator("test_plugin");
- return google::protobuf::compiler::PluginMain(argc, argv, &generator);
+ return google::protobuf::compiler::ProtobufMain(argc, argv);
}