From 6ef984af4b0c63c1c33127a12dcfc8e6359f0c9e Mon Sep 17 00:00:00 2001 From: Feng Xiao Date: Mon, 10 Nov 2014 17:34:54 -0800 Subject: Down-integrate from internal code base. --- .../protobuf/compiler/command_line_interface_unittest.cc | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'src/google/protobuf/compiler/command_line_interface_unittest.cc') diff --git a/src/google/protobuf/compiler/command_line_interface_unittest.cc b/src/google/protobuf/compiler/command_line_interface_unittest.cc index 5bc1fea9..6e1a204d 100644 --- a/src/google/protobuf/compiler/command_line_interface_unittest.cc +++ b/src/google/protobuf/compiler/command_line_interface_unittest.cc @@ -41,6 +41,9 @@ #include #endif #include +#ifndef _SHARED_PTR_H +#include +#endif #include #include @@ -48,6 +51,7 @@ #include #include #include +#include #include #include #include @@ -59,6 +63,7 @@ #include #include + namespace google { namespace protobuf { namespace compiler { @@ -77,6 +82,10 @@ namespace compiler { namespace { +bool FileExists(const string& path) { + return File::Exists(path); +} + class CommandLineInterfaceTest : public testing::Test { protected: virtual void SetUp(); @@ -226,7 +235,7 @@ void CommandLineInterfaceTest::SetUp() { // If the temp directory already exists, it must be left over from a // previous run. Delete it. - if (File::Exists(temp_directory_)) { + if (FileExists(temp_directory_)) { File::DeleteRecursively(temp_directory_, NULL, NULL); } @@ -335,7 +344,7 @@ void CommandLineInterfaceTest::CreateTempFile( string::size_type slash_pos = name.find_last_of('/'); if (slash_pos != string::npos) { string dir = name.substr(0, slash_pos); - if (!File::Exists(temp_directory_ + "/" + dir)) { + if (!FileExists(temp_directory_ + "/" + dir)) { GOOGLE_CHECK_OK(File::RecursivelyCreateDir(temp_directory_ + "/" + dir, 0777)); } -- cgit v1.2.3