| Index: third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc
|
| index fe527623c4f3f5fde05fb9f6a0eaaa16c59877b5..ccc94c9dfe3edc33bd1791110b31e58cb66d27b3 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/java/java_plugin_unittest.cc
|
| @@ -1,6 +1,6 @@
|
| // Protocol Buffers - Google's data interchange format
|
| // Copyright 2008 Google Inc. All rights reserved.
|
| -// https://developers.google.com/protocol-buffers/
|
| +// http://code.google.com/p/protobuf/
|
| //
|
| // Redistribution and use in source and binary forms, with or without
|
| // modification, are permitted provided that the following conditions are
|
| @@ -34,11 +34,6 @@
|
| // It seemed like parameterizing it would add more complexity than it is
|
| // worth.
|
|
|
| -#include <memory>
|
| -#ifndef _SHARED_PTR_H
|
| -#include <google/protobuf/stubs/shared_ptr.h>
|
| -#endif
|
| -
|
| #include <google/protobuf/compiler/java/java_generator.h>
|
| #include <google/protobuf/compiler/command_line_interface.h>
|
| #include <google/protobuf/io/zero_copy_stream.h>
|
| @@ -75,8 +70,8 @@ class TestGenerator : public CodeGenerator {
|
|
|
| void TryInsert(const string& filename, const string& insertion_point,
|
| GeneratorContext* context) const {
|
| - google::protobuf::scoped_ptr<io::ZeroCopyOutputStream> output(
|
| - context->OpenForInsert(filename, insertion_point));
|
| + scoped_ptr<io::ZeroCopyOutputStream> output(
|
| + context->OpenForInsert(filename, insertion_point));
|
| io::Printer printer(output.get(), '$');
|
| printer.Print("// inserted $name$\n", "name", insertion_point);
|
| }
|
| @@ -86,16 +81,16 @@ class TestGenerator : public CodeGenerator {
|
| // not verify that they are correctly-placed; that would require actually
|
| // compiling the output which is a bit more than I care to do for this test.
|
| TEST(JavaPluginTest, PluginTest) {
|
| - GOOGLE_CHECK_OK(File::SetContents(TestTempDir() + "/test.proto",
|
| - "syntax = \"proto2\";\n"
|
| - "package foo;\n"
|
| - "option java_package = \"\";\n"
|
| - "option java_outer_classname = \"Test\";\n"
|
| - "message Bar {\n"
|
| - " message Baz {}\n"
|
| - "}\n"
|
| - "enum Qux { BLAH = 1; }\n",
|
| - true));
|
| + File::WriteStringToFileOrDie(
|
| + "syntax = \"proto2\";\n"
|
| + "package foo;\n"
|
| + "option java_package = \"\";\n"
|
| + "option java_outer_classname = \"Test\";\n"
|
| + "message Bar {\n"
|
| + " message Baz {}\n"
|
| + "}\n"
|
| + "enum Qux { BLAH = 1; }\n",
|
| + TestTempDir() + "/test.proto");
|
|
|
| google::protobuf::compiler::CommandLineInterface cli;
|
| cli.SetInputsAreProtoPathRelative(true);
|
|
|