Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(300)

Unified Diff: base/test/gtest_util.h

Issue 2288473002: Implement Dump-on-DCHECK (via a new LogSeverity). (Closed)
Patch Set: Migrate some tests to EXPECT_DCHECK_DEATH Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: base/test/gtest_util.h
diff --git a/base/test/gtest_util.h b/base/test/gtest_util.h
index 8dfb1f236f38713e3cf5985c7974cd3f16429b3f..c8e44e7aaa10a390eaa2643c2d87903aad8cb22e 100644
--- a/base/test/gtest_util.h
+++ b/base/test/gtest_util.h
@@ -21,7 +21,7 @@
// 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)
Wez 2016/12/19 23:57:46 This causes EXPECT_DCHECK_DEATH to be a no-op if D
// 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
@@ -42,7 +42,7 @@
GTEST_AMBIGUOUS_ELSE_BLOCKER_ \
if (::testing::internal::AlwaysTrue()) { \
GTEST_LOG_(WARNING) \
- << "Death tests are not supported on this platform.\n" \
+ << "Death tests are not supported in this configuration.\n" \
<< "Statement '" #statement "' cannot be verified."; \
} else if (::testing::internal::AlwaysFalse()) { \
::testing::internal::RE::PartialMatch(".*", (regex)); \

Powered by Google App Engine
This is Rietveld 408576698