diff options
author | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-06 01:20:15 (GMT) |
---|---|---|
committer | zhanyong.wan <zhanyong.wan@861a406c-534a-0410-8894-cb66d6ee9925> | 2009-03-06 01:20:15 (GMT) |
commit | 4984c93490eeeb7d3d1979b30a39a21cad07cba5 (patch) | |
tree | ca3c2306a370dda3388a4cbd34d22331debaec87 /test/gtest_output_test_.cc | |
parent | 0af0709b02899f9177db55eba7929e65e5834b29 (diff) | |
download | googletest-4984c93490eeeb7d3d1979b30a39a21cad07cba5.zip googletest-4984c93490eeeb7d3d1979b30a39a21cad07cba5.tar.gz googletest-4984c93490eeeb7d3d1979b30a39a21cad07cba5.tar.bz2 |
Implements death tests on Windows (by Vlad Losev); enables POSIX regex on Mac and Cygwin; fixes build issue on some Linux versions due to PATH_MAX.
Diffstat (limited to 'test/gtest_output_test_.cc')
-rw-r--r-- | test/gtest_output_test_.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/test/gtest_output_test_.cc b/test/gtest_output_test_.cc index a8ffa41..90d89b9 100644 --- a/test/gtest_output_test_.cc +++ b/test/gtest_output_test_.cc @@ -988,7 +988,18 @@ int main(int argc, char **argv) { if (testing::internal::GTEST_FLAG(internal_run_death_test) != "") { // 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 +#else freopen("/dev/null", "w", stdout); +#endif // GTEST_OS_WINDOWS return RUN_ALL_TESTS(); } #endif // GTEST_HAS_DEATH_TEST |