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

Unified Diff: base/metrics/sample_map_unittest.cc

Issue 1471073007: Reorganize histograms for persistence. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@shmem-alloc
Patch Set: addressed review comments by Alexei Created 5 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
« no previous file with comments | « base/metrics/sample_map.cc ('k') | base/metrics/sample_vector.h » ('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 22ce8e1c8e3ab3a347af2e008ce622bb662cd67d..c941d65f061af1dab3050613b2a136cab9bdd55e 100644
--- a/base/metrics/sample_map_unittest.cc
+++ b/base/metrics/sample_map_unittest.cc
@@ -11,7 +11,7 @@ namespace base {
namespace {
TEST(SampleMapTest, AccumulateTest) {
- SampleMap samples;
+ SampleMap samples(1);
samples.Accumulate(1, 100);
samples.Accumulate(2, 200);
@@ -25,8 +25,8 @@ TEST(SampleMapTest, AccumulateTest) {
}
TEST(SampleMapTest, AddSubtractTest) {
- SampleMap samples1;
- SampleMap samples2;
+ SampleMap samples1(1);
+ SampleMap samples2(2);
samples1.Accumulate(1, 100);
samples1.Accumulate(2, 100);
@@ -56,7 +56,7 @@ TEST(SampleMapTest, AddSubtractTest) {
}
TEST(SampleMapIteratorTest, IterateTest) {
- SampleMap samples;
+ SampleMap samples(1);
samples.Accumulate(1, 100);
samples.Accumulate(2, 200);
samples.Accumulate(4, -300);
@@ -91,14 +91,14 @@ TEST(SampleMapIteratorTest, IterateTest) {
}
TEST(SampleMapIteratorTest, SkipEmptyRanges) {
- SampleMap samples;
+ SampleMap samples(1);
samples.Accumulate(5, 1);
samples.Accumulate(10, 2);
samples.Accumulate(15, 3);
samples.Accumulate(20, 4);
samples.Accumulate(25, 5);
- SampleMap samples2;
+ SampleMap samples2(2);
samples2.Accumulate(5, 1);
samples2.Accumulate(20, 4);
samples2.Accumulate(25, 5);
@@ -132,7 +132,7 @@ TEST(SampleMapIteratorTest, SkipEmptyRanges) {
#if (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
- SampleMap samples;
+ SampleMap samples(1);
scoped_ptr<SampleCountIterator> it = samples.Iterator();
« no previous file with comments | « base/metrics/sample_map.cc ('k') | base/metrics/sample_vector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698