aboutsummaryrefslogtreecommitdiff
path: root/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
diff options
context:
space:
mode:
authorAustin Schuh <austin@peloton-tech.com>2015-06-10 23:33:07 -0700
committerAustin Schuh <austin@peloton-tech.com>2015-06-10 23:33:07 -0700
commit1ecef1a2f5b1063e2f8f4616508386543905466f (patch)
tree66e1e52f64f59e41b6d6a6d500f40bdf706e887a /src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
parent7b354163742ab67e0e920fa6da0f43e2789855c2 (diff)
downloadprotobuf-1ecef1a2f5b1063e2f8f4616508386543905466f.tar.gz
protobuf-1ecef1a2f5b1063e2f8f4616508386543905466f.tar.bz2
protobuf-1ecef1a2f5b1063e2f8f4616508386543905466f.zip
Modified FindRubyTestDir to use GOOGLE_THIRD_PARTY_PROTOBUF
Diffstat (limited to 'src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc')
-rw-r--r--src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
index 6c203ab6..1b04cb32 100644
--- a/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
+++ b/src/google/protobuf/compiler/ruby/ruby_generator_unittest.cc
@@ -47,6 +47,7 @@ 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)) {
@@ -57,6 +58,9 @@ string FindRubyTestDir(const string& file) {
prefix += "/..";
}
return prefix + "/src/google/protobuf/compiler/ruby";
+#else
+ return "third_party/protobuf/src/google/protobuf/compiler/ruby";
+#endif // GOOGLE_THIRD_PARTY_PROTOBUF
}
// This test is a simple golden-file test over the output of the Ruby code