| Index: base/test/gtest_util.h
|
| diff --git a/base/test/gtest_util.h b/base/test/gtest_util.h
|
| index 8dfb1f236f38713e3cf5985c7974cd3f16429b3f..4b3151b4b0c73f449ce9a808f53f7b25c91221d3 100644
|
| --- a/base/test/gtest_util.h
|
| +++ b/base/test/gtest_util.h
|
| @@ -21,7 +21,8 @@
|
| // happen and as such executing the statement results in undefined behavior
|
| // (|statement| is compiled in unsupported configurations nonetheless).
|
| // Death tests misbehave on Android.
|
| -#if DCHECK_IS_ON() && defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID)
|
| +#if DCHECK_IS_ON() && defined(GTEST_HAS_DEATH_TEST) && !defined(OS_ANDROID) && \
|
| + !defined(DCHECK_IS_DUMP_WITHOUT_CRASH)
|
|
|
| // EXPECT/ASSERT_DCHECK_DEATH tests verify that a DCHECK is hit ("Check failed"
|
| // is part of the error message), but intentionally do not expose the gtest
|
| @@ -38,18 +39,18 @@
|
| // conditions in which it's needed here.
|
| // TODO(gab): Expose macro in upstream gtest repo for consumers like us that
|
| // want more specific death tests and remove this hack.
|
| -# define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
|
| - GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
| - if (::testing::internal::AlwaysTrue()) { \
|
| - GTEST_LOG_(WARNING) \
|
| - << "Death tests are not supported on this platform.\n" \
|
| - << "Statement '" #statement "' cannot be verified."; \
|
| - } else if (::testing::internal::AlwaysFalse()) { \
|
| - ::testing::internal::RE::PartialMatch(".*", (regex)); \
|
| - GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
|
| - terminator; \
|
| - } else \
|
| - ::testing::Message()
|
| +#define GTEST_UNSUPPORTED_DEATH_TEST(statement, regex, terminator) \
|
| + GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
|
| + if (::testing::internal::AlwaysTrue()) { \
|
| + GTEST_LOG_(WARNING) \
|
| + << "Death tests are not supported in this configuration.\n" \
|
| + << "Statement '" #statement "' cannot be verified."; \
|
| + } else if (::testing::internal::AlwaysFalse()) { \
|
| + ::testing::internal::RE::PartialMatch(".*", (regex)); \
|
| + GTEST_SUPPRESS_UNREACHABLE_CODE_WARNING_BELOW_(statement); \
|
| + terminator; \
|
| + } else \
|
| + ::testing::Message()
|
|
|
| #define EXPECT_DCHECK_DEATH(statement) \
|
| GTEST_UNSUPPORTED_DEATH_TEST(statement, "Check failed", )
|
|
|