diff options
author | 2017-12-19 21:14:30 -0800 | |
---|---|---|
committer | 2017-12-19 21:14:30 -0800 | |
commit | 343522c76f1c9a0e120e6fbc9bd45318444aa96d (patch) | |
tree | 1c9906583453b7c69c7ce92d6ab16dabce7e59e1 | |
parent | 2f041aed40fc2d97cbdd0a875b9a87b12711e142 (diff) | |
parent | 3a1a2f0a10569910ddaeba7b422f21ea2ed296ec (diff) |
Merge pull request #13838 from apolcyn/fix_parse_commandline_flags
Use ParseCommandLineFlags in golden file test in the same way that other test binaries use it
-rw-r--r-- | test/cpp/codegen/golden_file_test.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/test/cpp/codegen/golden_file_test.cc b/test/cpp/codegen/golden_file_test.cc index 14880982b5..7e4d15a7c9 100644 --- a/test/cpp/codegen/golden_file_test.cc +++ b/test/cpp/codegen/golden_file_test.cc @@ -22,6 +22,13 @@ #include <gflags/gflags.h> #include <gtest/gtest.h> +// In some distros, gflags is in the namespace google, and in some others, +// in gflags. This hack is enabling us to find both. +namespace google {} +namespace gflags {} +using namespace google; +using namespace gflags; + DEFINE_string( generated_file_path, "", "path to the directory containing generated files compiler_test.grpc.pb.h" @@ -60,7 +67,7 @@ TEST(GoldenMockFileTest, TestGeneratedMockFile) { int main(int argc, char** argv) { ::testing::InitGoogleTest(&argc, argv); - ::google::ParseCommandLineFlags(&argc, &argv, true); + ParseCommandLineFlags(&argc, &argv, true); if (FLAGS_generated_file_path.empty()) { FLAGS_generated_file_path = "gens/src/proto/grpc/testing/"; } |