diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-26 19:03:47 +0000 |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-26 19:03:47 +0000 |
commit | 3c7bbf5b46679aea4e0ac7d3ad241cb036146751 (patch) | |
tree | f452879c8f86232be2dec970ec7bce3a9963ed49 /test/gtest-options_test.cc | |
parent | f3c6efd8d78f96a9a500b3ba7e024de122b9afa1 (diff) | |
download | googletest-3c7bbf5b46679aea4e0ac7d3ad241cb036146751.tar.gz googletest-3c7bbf5b46679aea4e0ac7d3ad241cb036146751.tar.bz2 googletest-3c7bbf5b46679aea4e0ac7d3ad241cb036146751.zip |
Simplifies implementation by defining a POSIX portability layer; adds the death test style flag to --help.
Diffstat (limited to 'test/gtest-options_test.cc')
-rw-r--r-- | test/gtest-options_test.cc | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/test/gtest-options_test.cc b/test/gtest-options_test.cc index 27a6fe54..d49efe49 100644 --- a/test/gtest-options_test.cc +++ b/test/gtest-options_test.cc @@ -150,22 +150,14 @@ class XmlOutputChangeDirTest : public Test { protected: virtual void SetUp() { original_working_dir_ = FilePath::GetCurrentDir(); - ChDir(".."); + posix::chdir(".."); // This will make the test fail if run from the root directory. EXPECT_STRNE(original_working_dir_.c_str(), FilePath::GetCurrentDir().c_str()); } virtual void TearDown() { - ChDir(original_working_dir_.c_str()); - } - - void ChDir(const char* dir) { -#if GTEST_OS_WINDOWS - _chdir(dir); -#else - chdir(dir); -#endif + posix::chdir(original_working_dir_.c_str()); } FilePath original_working_dir_; |