diff options
author | Wink Saville <wink@google.com> | 2010-05-29 13:00:38 -0700 |
---|---|---|
committer | Wink Saville <wink@google.com> | 2010-05-29 13:00:38 -0700 |
commit | d0332953cda33fb4f8e24ebff9c49159b69c43d6 (patch) | |
tree | 81612e8b12f590310aeb0ebf1da37b304eb7baa6 /gtest/test/gtest-filepath_test.cc | |
parent | ede38fe9b9f93888e6e41afc7abb09525f44da95 (diff) | |
download | external_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.zip external_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.tar.gz external_protobuf-d0332953cda33fb4f8e24ebff9c49159b69c43d6.tar.bz2 |
Add protobuf 2.3.0 sources
This is the contents of protobuf-2.3.0.tar.bz2 from
http://code.google.com/p/protobuf/downloads/list.
Change-Id: Idfde09ce7ef5ac027b07ee83f2674fbbed5c30b2
Diffstat (limited to 'gtest/test/gtest-filepath_test.cc')
-rw-r--r-- | gtest/test/gtest-filepath_test.cc | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/gtest/test/gtest-filepath_test.cc b/gtest/test/gtest-filepath_test.cc index adf9746..5bc4daf 100644 --- a/gtest/test/gtest-filepath_test.cc +++ b/gtest/test/gtest-filepath_test.cc @@ -50,17 +50,17 @@ #include "src/gtest-internal-inl.h" #undef GTEST_IMPLEMENTATION_ -#ifdef _WIN32_WCE +#if GTEST_OS_WINDOWS_MOBILE #include <windows.h> // NOLINT #elif GTEST_OS_WINDOWS #include <direct.h> // NOLINT -#endif // _WIN32_WCE +#endif // GTEST_OS_WINDOWS_MOBILE namespace testing { namespace internal { namespace { -#ifdef _WIN32_WCE +#if GTEST_OS_WINDOWS_MOBILE // TODO(wan@google.com): Move these to the POSIX adapter section in // gtest-port.h. @@ -81,9 +81,7 @@ int _rmdir(const char* path) { return ret; } -#endif // _WIN32_WCE - -#ifndef _WIN32_WCE +#else TEST(GetCurrentDirTest, ReturnsCurrentDir) { const FilePath original_dir = FilePath::GetCurrentDir(); @@ -103,7 +101,7 @@ TEST(GetCurrentDirTest, ReturnsCurrentDir) { #endif } -#endif // _WIN32_WCE +#endif // GTEST_OS_WINDOWS_MOBILE TEST(IsEmptyTest, ReturnsTrueForEmptyPath) { EXPECT_TRUE(FilePath("").IsEmpty()); @@ -156,7 +154,7 @@ TEST(RemoveDirectoryNameTest, ShouldAlsoGiveFileName) { // RemoveFileName "" -> "./" TEST(RemoveFileNameTest, EmptyName) { -#ifdef _WIN32_WCE +#if GTEST_OS_WINDOWS_MOBILE // On Windows CE, we use the root as the current directory. EXPECT_STREQ(GTEST_PATH_SEP_, FilePath("").RemoveFileName().c_str()); @@ -344,12 +342,12 @@ TEST(DirectoryTest, RootOfWrongDriveDoesNotExists) { } #endif // GTEST_OS_WINDOWS -#ifndef _WIN32_WCE +#if !GTEST_OS_WINDOWS_MOBILE // Windows CE _does_ consider an empty directory to exist. TEST(DirectoryTest, EmptyPathDirectoryDoesNotExist) { EXPECT_FALSE(FilePath("").DirectoryExists()); } -#endif // ! _WIN32_WCE +#endif // !GTEST_OS_WINDOWS_MOBILE TEST(DirectoryTest, CurrentDirectoryExists) { #if GTEST_OS_WINDOWS // We are on Windows. @@ -449,9 +447,8 @@ class DirectoryCreationTest : public Test { } String TempDir() const { -#ifdef _WIN32_WCE +#if GTEST_OS_WINDOWS_MOBILE return String("\\temp\\"); - #elif GTEST_OS_WINDOWS const char* temp_dir = posix::GetEnv("TEMP"); if (temp_dir == NULL || temp_dir[0] == '\0') @@ -462,7 +459,7 @@ class DirectoryCreationTest : public Test { return String::Format("%s\\", temp_dir); #else return String("/tmp/"); -#endif +#endif // GTEST_OS_WINDOWS_MOBILE } void CreateTextFile(const char* filename) { |