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_output_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_output_test_.cc')
-rw-r--r-- | test/gtest_output_test_.cc | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc index 90d89b94..c867e159 100644 --- a/test/gtest_output_test_.cc +++ b/test/gtest_output_test_.cc @@ -60,6 +60,7 @@ using testing::ScopedFakeTestPartResultReporter; using testing::TestPartResultArray; +namespace posix = ::testing::internal::posix; using testing::internal::String; // Tests catching fatal failures. @@ -989,16 +990,9 @@ int main(int argc, char **argv) { // Skip the usual output capturing if we're running as the child // process of an threadsafe-style death test. #if GTEST_OS_WINDOWS -#ifdef _MSC_VER -#pragma warning(push) -#pragma warning(disable:4996) -#endif // _MSC_VER - freopen("nul:", "w", stdout); -#ifdef _MSC_VER -#pragma warning(pop) -#endif // _MSC_VER + posix::freopen("nul:", "w", stdout); #else - freopen("/dev/null", "w", stdout); + posix::freopen("/dev/null", "w", stdout); #endif // GTEST_OS_WINDOWS return RUN_ALL_TESTS(); } |