From 3c7bbf5b46679aea4e0ac7d3ad241cb036146751 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Thu, 26 Mar 2009 19:03:47 +0000 Subject: Simplifies implementation by defining a POSIX portability layer; adds the death test style flag to --help. --- test/gtest-options_test.cc | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) (limited to 'test/gtest-options_test.cc') 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_; -- cgit v1.2.3