From 81e1cc73c83265e54b2ec7edc17e77f4d1b89e86 Mon Sep 17 00:00:00 2001 From: "zhanyong.wan" Date: Thu, 28 Jan 2010 21:50:29 +0000 Subject: Introduces macro GTEST_HAS_STREAM_REDIRECTION_ (by Vlad Losev); fixes unsynchronized color text output on Windows (by Vlad Losev); fixes the cmake script to work with MSVC 10 (by Manuel Klimek). --- include/gtest/internal/gtest-port.h | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'include/gtest/internal') diff --git a/include/gtest/internal/gtest-port.h b/include/gtest/internal/gtest-port.h index 467f6974..d94c3797 100644 --- a/include/gtest/internal/gtest-port.h +++ b/include/gtest/internal/gtest-port.h @@ -77,7 +77,7 @@ // GTEST_OS_WINDOWS - Windows (Desktop, MinGW, or Mobile) // GTEST_OS_WINDOWS_DESKTOP - Windows Desktop // GTEST_OS_WINDOWS_MINGW - MinGW -// GTEST_OS_WINODWS_MOBILE - Windows Mobile +// GTEST_OS_WINDOWS_MOBILE - Windows Mobile // GTEST_OS_ZOS - z/OS // // Among the platforms, Cygwin, Linux, Max OS X, and Windows have the @@ -436,6 +436,12 @@ #endif // GTEST_HAS_CLONE +// Determines whether to support stream redirection. This is used to test +// output correctness and to implement death tests. +#if !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN +#define GTEST_HAS_STREAM_REDIRECTION_ 1 +#endif // !GTEST_OS_WINDOWS_MOBILE && !GTEST_OS_SYMBIAN + // Determines whether to support death tests. // Google Test does not support death tests for VC 7.1 and earlier as // abort() in a VC 7.1 application compiled as GUI in debug config @@ -696,7 +702,7 @@ class GTestLog { inline void LogToStderr() {} inline void FlushInfoLog() { fflush(NULL); } -#if !GTEST_OS_WINDOWS_MOBILE +#if GTEST_HAS_STREAM_REDIRECTION_ // Defines the stderr capturer: // CaptureStdout - starts capturing stdout. @@ -709,7 +715,7 @@ String GetCapturedStdout(); void CaptureStderr(); String GetCapturedStderr(); -#endif // !GTEST_OS_WINDOWS_MOBILE +#endif // GTEST_HAS_STREAM_REDIRECTION_ #if GTEST_HAS_DEATH_TEST -- cgit v1.2.3