|
|
@ -304,16 +304,12 @@ |
|
|
|
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
|
|
|
|
// GTEST_DISABLE_MSC_WARNINGS_PUSH_(4800 4385)
|
|
|
|
// /* code that triggers warnings C4800 and C4385 */
|
|
|
|
// /* code that triggers warnings C4800 and C4385 */
|
|
|
|
// GTEST_DISABLE_MSC_WARNINGS_POP_()
|
|
|
|
// GTEST_DISABLE_MSC_WARNINGS_POP_()
|
|
|
|
#if _MSC_VER >= 1400 |
|
|
|
#if defined(_MSC_VER) |
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \ |
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) \ |
|
|
|
__pragma(warning(push)) \
|
|
|
|
__pragma(warning(push)) \
|
|
|
|
__pragma(warning(disable: warnings)) |
|
|
|
__pragma(warning(disable: warnings)) |
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_POP_() \ |
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_POP_() \ |
|
|
|
__pragma(warning(pop)) |
|
|
|
__pragma(warning(pop)) |
|
|
|
#else |
|
|
|
|
|
|
|
// Older versions of MSVC don't have __pragma.
|
|
|
|
|
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_PUSH_(warnings) |
|
|
|
|
|
|
|
# define GTEST_DISABLE_MSC_WARNINGS_POP_() |
|
|
|
|
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
|
|
|
|
// Clang on Windows does not understand MSVC's pragma warning.
|
|
|
|
// Clang on Windows does not understand MSVC's pragma warning.
|
|
|
@ -653,12 +649,10 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; |
|
|
|
#endif // GTEST_HAS_STREAM_REDIRECTION
|
|
|
|
#endif // GTEST_HAS_STREAM_REDIRECTION
|
|
|
|
|
|
|
|
|
|
|
|
// Determines whether to support death tests.
|
|
|
|
// 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
|
|
|
|
|
|
|
|
// pops up a dialog window that cannot be suppressed programmatically.
|
|
|
|
// pops up a dialog window that cannot be suppressed programmatically.
|
|
|
|
#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ |
|
|
|
#if (GTEST_OS_LINUX || GTEST_OS_CYGWIN || GTEST_OS_SOLARIS || \ |
|
|
|
(GTEST_OS_MAC && !GTEST_OS_IOS) || \
|
|
|
|
(GTEST_OS_MAC && !GTEST_OS_IOS) || \
|
|
|
|
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER >= 1400) || \
|
|
|
|
(GTEST_OS_WINDOWS_DESKTOP && _MSC_VER) || \
|
|
|
|
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
|
|
|
|
GTEST_OS_WINDOWS_MINGW || GTEST_OS_AIX || GTEST_OS_HPUX || \
|
|
|
|
GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \
|
|
|
|
GTEST_OS_OPENBSD || GTEST_OS_QNX || GTEST_OS_FREEBSD || \
|
|
|
|
GTEST_OS_NETBSD || GTEST_OS_FUCHSIA) |
|
|
|
GTEST_OS_NETBSD || GTEST_OS_FUCHSIA) |
|
|
@ -669,7 +663,7 @@ typedef struct _RTL_CRITICAL_SECTION GTEST_CRITICAL_SECTION; |
|
|
|
|
|
|
|
|
|
|
|
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
|
|
|
|
// Typed tests need <typeinfo> and variadic macros, which GCC, VC++ 8.0,
|
|
|
|
// Sun Pro CC, IBM Visual Age, and HP aCC support.
|
|
|
|
// Sun Pro CC, IBM Visual Age, and HP aCC support.
|
|
|
|
#if defined(__GNUC__) || (_MSC_VER >= 1400) || defined(__SUNPRO_CC) || \ |
|
|
|
#if defined(__GNUC__) || defined(_MSC_VER) || defined(__SUNPRO_CC) || \ |
|
|
|
defined(__IBMCPP__) || defined(__HP_aCC) |
|
|
|
defined(__IBMCPP__) || defined(__HP_aCC) |
|
|
|
# define GTEST_HAS_TYPED_TEST 1 |
|
|
|
# define GTEST_HAS_TYPED_TEST 1 |
|
|
|
# define GTEST_HAS_TYPED_TEST_P 1 |
|
|
|
# define GTEST_HAS_TYPED_TEST_P 1 |
|
|
@ -2321,13 +2315,12 @@ GTEST_DISABLE_MSC_DEPRECATED_POP_() |
|
|
|
// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
|
|
|
|
// MSVC-based platforms. We map the GTEST_SNPRINTF_ macro to the appropriate
|
|
|
|
// function in order to achieve that. We use macro definition here because
|
|
|
|
// function in order to achieve that. We use macro definition here because
|
|
|
|
// snprintf is a variadic function.
|
|
|
|
// snprintf is a variadic function.
|
|
|
|
#if _MSC_VER >= 1400 && !GTEST_OS_WINDOWS_MOBILE |
|
|
|
#if _MSC_VER && !GTEST_OS_WINDOWS_MOBILE |
|
|
|
// MSVC 2005 and above support variadic macros.
|
|
|
|
// MSVC 2005 and above support variadic macros.
|
|
|
|
# define GTEST_SNPRINTF_(buffer, size, format, ...) \ |
|
|
|
# define GTEST_SNPRINTF_(buffer, size, format, ...) \ |
|
|
|
_snprintf_s(buffer, size, size, format, __VA_ARGS__) |
|
|
|
_snprintf_s(buffer, size, size, format, __VA_ARGS__) |
|
|
|
#elif defined(_MSC_VER) |
|
|
|
#elif defined(_MSC_VER) |
|
|
|
// Windows CE does not define _snprintf_s and MSVC prior to 2005 doesn't
|
|
|
|
// Windows CE does not define _snprintf_s
|
|
|
|
// complain about _snprintf.
|
|
|
|
|
|
|
|
# define GTEST_SNPRINTF_ _snprintf |
|
|
|
# define GTEST_SNPRINTF_ _snprintf |
|
|
|
#else |
|
|
|
#else |
|
|
|
# define GTEST_SNPRINTF_ snprintf |
|
|
|
# define GTEST_SNPRINTF_ snprintf |
|
|
|