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

Unified Diff: base/metrics/sample_map_unittest.cc

Issue 2162053006: Move EXPECT_DCHECK_DEATH from base/task_scheduler and use it in relevant base/ tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: merge up to r408965 Created 4 years, 5 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 | « base/metrics/persistent_sample_map_unittest.cc ('k') | base/metrics/sample_vector_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/sample_map_unittest.cc
diff --git a/base/metrics/sample_map_unittest.cc b/base/metrics/sample_map_unittest.cc
index 8f577109cdcdc776fb4a7ffd37add8f0edbb055c..320ed9217b4274edb87dd9f079519e7a597ed33f 100644
--- a/base/metrics/sample_map_unittest.cc
+++ b/base/metrics/sample_map_unittest.cc
@@ -6,6 +6,7 @@
#include <memory>
+#include "base/test/gtest_util.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace base {
@@ -144,8 +145,6 @@ TEST(SampleMapIteratorTest, SkipEmptyRanges) {
EXPECT_TRUE(it->Done());
}
-#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
SampleMap samples(1);
@@ -156,17 +155,14 @@ TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
HistogramBase::Sample min;
HistogramBase::Sample max;
HistogramBase::Count count;
- EXPECT_DEATH(it->Get(&min, &max, &count), "");
+ EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count), "");
- EXPECT_DEATH(it->Next(), "");
+ EXPECT_DCHECK_DEATH(it->Next(), "");
samples.Accumulate(1, 100);
it = samples.Iterator();
EXPECT_FALSE(it->Done());
}
-#endif
-// (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
-
} // namespace
} // namespace base
« no previous file with comments | « base/metrics/persistent_sample_map_unittest.cc ('k') | base/metrics/sample_vector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698