| Index: third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
| diff --git a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
| index 30b1d2bf3ad788664d46d5b139094a761786c781..bcfa50207358313b5832c7f73eedbd495ee8c116 100644
|
| --- a/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
| +++ b/third_party/protobuf/src/google/protobuf/compiler/cpp/cpp_bootstrap_unittest.cc
|
| @@ -79,10 +79,10 @@ class MockErrorCollector : public MultiFileErrorCollector {
|
| }
|
| };
|
|
|
| -class MockOutputDirectory : public OutputDirectory {
|
| +class MockGeneratorContext : public GeneratorContext {
|
| public:
|
| - MockOutputDirectory() {}
|
| - ~MockOutputDirectory() {
|
| + MockGeneratorContext() {}
|
| + ~MockGeneratorContext() {
|
| STLDeleteValues(&files_);
|
| }
|
|
|
| @@ -102,7 +102,7 @@ class MockOutputDirectory : public OutputDirectory {
|
| "to your CL.";
|
| }
|
|
|
| - // implements OutputDirectory --------------------------------------
|
| + // implements GeneratorContext --------------------------------------
|
|
|
| virtual io::ZeroCopyOutputStream* Open(const string& filename) {
|
| string** map_slot = &files_[filename];
|
| @@ -130,24 +130,24 @@ TEST(BootstrapTest, GeneratedDescriptorMatches) {
|
| ASSERT_TRUE(plugin_proto_file != NULL);
|
|
|
| CppGenerator generator;
|
| - MockOutputDirectory output_directory;
|
| + MockGeneratorContext context;
|
| string error;
|
| string parameter;
|
| parameter = "dllexport_decl=LIBPROTOBUF_EXPORT";
|
| ASSERT_TRUE(generator.Generate(proto_file, parameter,
|
| - &output_directory, &error));
|
| + &context, &error));
|
| parameter = "dllexport_decl=LIBPROTOC_EXPORT";
|
| ASSERT_TRUE(generator.Generate(plugin_proto_file, parameter,
|
| - &output_directory, &error));
|
| -
|
| - output_directory.ExpectFileMatches("google/protobuf/descriptor.pb.h",
|
| - "google/protobuf/descriptor.pb.h");
|
| - output_directory.ExpectFileMatches("google/protobuf/descriptor.pb.cc",
|
| - "google/protobuf/descriptor.pb.cc");
|
| - output_directory.ExpectFileMatches("google/protobuf/compiler/plugin.pb.h",
|
| - "google/protobuf/compiler/plugin.pb.h");
|
| - output_directory.ExpectFileMatches("google/protobuf/compiler/plugin.pb.cc",
|
| - "google/protobuf/compiler/plugin.pb.cc");
|
| + &context, &error));
|
| +
|
| + context.ExpectFileMatches("google/protobuf/descriptor.pb.h",
|
| + "google/protobuf/descriptor.pb.h");
|
| + context.ExpectFileMatches("google/protobuf/descriptor.pb.cc",
|
| + "google/protobuf/descriptor.pb.cc");
|
| + context.ExpectFileMatches("google/protobuf/compiler/plugin.pb.h",
|
| + "google/protobuf/compiler/plugin.pb.h");
|
| + context.ExpectFileMatches("google/protobuf/compiler/plugin.pb.cc",
|
| + "google/protobuf/compiler/plugin.pb.cc");
|
| }
|
|
|
| } // namespace
|
|
|