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

Unified Diff: test/unittests/base/logging-unittest.cc

Issue 891693002: [base] Further improve the logging facility. Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Android GCC Created 5 years, 11 months 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
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/base/logging-unittest.cc
diff --git a/test/unittests/base/logging-unittest.cc b/test/unittests/base/logging-unittest.cc
index 918feb114bbbfdebd508600188acbcf38b7eff10..4d15175bb7a6ca0f4c40d18f3fdb57adb7145626 100644
--- a/test/unittests/base/logging-unittest.cc
+++ b/test/unittests/base/logging-unittest.cc
@@ -5,8 +5,23 @@
#include "src/base/logging.h"
#include "testing/gtest-support.h"
+#ifdef DEBUG
+#define DISABLE_IN_RELEASE(Name) Name
+#else
+#define DISABLE_IN_RELEASE(Name) DISABLED_##Name
+#endif
+
namespace v8 {
namespace base {
+namespace logging {
+
+TEST(LoggingDeathTest, DISABLE_IN_RELEASE(CheckFailureWithMessage)) {
+ ASSERT_DEATH_IF_SUPPORTED({ CHECK(false) << "This is a message"; },
+ "This is a message");
+ ASSERT_DEATH_IF_SUPPORTED({ CHECK_EQ(0, 1) << "This is stupid"; },
+ "This is stupid");
+}
+
TEST(LoggingTest, CheckEQImpl) {
EXPECT_EQ(nullptr, CheckEQImpl(0.0, 0.0, ""));
@@ -15,5 +30,6 @@ TEST(LoggingTest, CheckEQImpl) {
EXPECT_EQ(nullptr, CheckEQImpl(-0.0, -0.0, ""));
}
+} // namespace logging
} // namespace base
} // namespace v8
« no previous file with comments | « src/jsregexp.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698