diff options
Diffstat (limited to 'src/google/protobuf/compiler/ruby')
-rw-r--r-- | src/google/protobuf/compiler/ruby/ruby_generator.h | 6 | ||||
-rw-r--r-- | src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc | 4 |
2 files changed, 7 insertions, 3 deletions
diff --git a/src/google/protobuf/compiler/ruby/ruby_generator.h b/src/google/protobuf/compiler/ruby/ruby_generator.h index 8c1dfa26..521697fb 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator.h +++ b/src/google/protobuf/compiler/ruby/ruby_generator.h @@ -37,6 +37,8 @@ #include <google/protobuf/compiler/code_generator.h> +#include <google/protobuf/port_def.inc> + namespace google { namespace protobuf { namespace compiler { @@ -46,7 +48,7 @@ namespace ruby { // If you create your own protocol compiler binary and you want it to support // Ruby output, you can do so by registering an instance of this // CodeGenerator with the CommandLineInterface in your main() function. -class LIBPROTOC_EXPORT Generator +class PROTOC_EXPORT Generator : public google::protobuf::compiler::CodeGenerator { virtual bool Generate( const FileDescriptor* file, @@ -60,5 +62,7 @@ class LIBPROTOC_EXPORT Generator } // namespace protobuf } // namespace google +#include <google/protobuf/port_undef.inc> + #endif // GOOGLE_PROTOBUF_COMPILER_RUBY_GENERATOR_H__ diff --git a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc index 1aabe8aa..8454a5c5 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc @@ -90,12 +90,12 @@ TEST(RubyGeneratorTest, GeneratorTest) { // Load the generated output and compare to the expected result. string output; - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_CHECK_OK(File::GetContentsAsText( TestTempDir() + "/ruby_generated_code_pb.rb", &output, true)); string expected_output; - GOOGLE_CHECK_OK(File::GetContents( + GOOGLE_CHECK_OK(File::GetContentsAsText( ruby_tests + "/ruby_generated_code_pb.rb", &expected_output, true)); |