diff options
author | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:23:27 -0700 |
---|---|---|
committer | Adam Cozzette <acozzette@google.com> | 2016-06-29 15:38:03 -0700 |
commit | d64a2d9941c36a7bc2a7959ea10ab8363192ac14 (patch) | |
tree | 52330d146ad63d3d70f3baade00d5d1fea8f5e0c /src/google/protobuf/compiler/ruby | |
parent | c18aa7795a2e02ef700ff8b039d94ecdcc33432f (diff) | |
download | protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.gz protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.tar.bz2 protobuf-d64a2d9941c36a7bc2a7959ea10ab8363192ac14.zip |
Integrated internal changes from Google
This includes all internal changes from around May 20 to now.
Diffstat (limited to 'src/google/protobuf/compiler/ruby')
-rw-r--r-- | src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc index 1b04cb32..c0acb407 100644 --- a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc +++ b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc @@ -45,22 +45,8 @@ namespace compiler { namespace ruby { namespace { -string FindRubyTestDir(const string& file) { - // Inspired by TestSourceDir() in src/google/protobuf/testing/googletest.cc. -#ifndef GOOGLE_THIRD_PARTY_PROTOBUF - string prefix = "."; - while (!File::Exists(prefix + "/src/google/protobuf/compiler/ruby" + file)) { - if (!File::Exists(prefix)) { - GOOGLE_LOG(FATAL) - << "Could not find Ruby test directory. Please run tests from " - "somewhere within the protobuf source package."; - } - prefix += "/.."; - } - return prefix + "/src/google/protobuf/compiler/ruby"; -#else - return "third_party/protobuf/src/google/protobuf/compiler/ruby"; -#endif // GOOGLE_THIRD_PARTY_PROTOBUF +string FindRubyTestDir() { + return TestSourceDir() + "/google/protobuf/compiler/ruby"; } // This test is a simple golden-file test over the output of the Ruby code @@ -71,7 +57,7 @@ string FindRubyTestDir(const string& file) { // extensions to the point where we can do this test in a more automated way. TEST(RubyGeneratorTest, GeneratorTest) { - string ruby_tests = FindRubyTestDir("/ruby_generated_code.proto"); + string ruby_tests = FindRubyTestDir(); google::protobuf::compiler::CommandLineInterface cli; cli.SetInputsAreProtoPathRelative(true); |