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

Side by Side Diff: base/metrics/persistent_sample_map_unittest.cc

Issue 2213933003: Change EXPECT/ASSERT_DCHECK_DEATH macro to not expose the |regex| parameter. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b2b0_simplethreadJoinable
Patch Set: Disabling a death test which crashed instead of DCHECKing : http://crbug.com/634552 Created 4 years, 4 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 unified diff | Download patch
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sample_map_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "base/metrics/persistent_sample_map.h" 5 #include "base/metrics/persistent_sample_map.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/metrics/persistent_histogram_allocator.h" 10 #include "base/metrics/persistent_histogram_allocator.h"
(...skipping 229 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 HistogramSamples::Metadata meta; 240 HistogramSamples::Metadata meta;
241 PersistentSampleMap samples(1, allocator.get(), &meta); 241 PersistentSampleMap samples(1, allocator.get(), &meta);
242 242
243 std::unique_ptr<SampleCountIterator> it = samples.Iterator(); 243 std::unique_ptr<SampleCountIterator> it = samples.Iterator();
244 244
245 EXPECT_TRUE(it->Done()); 245 EXPECT_TRUE(it->Done());
246 246
247 HistogramBase::Sample min; 247 HistogramBase::Sample min;
248 HistogramBase::Sample max; 248 HistogramBase::Sample max;
249 HistogramBase::Count count; 249 HistogramBase::Count count;
250 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count), ""); 250 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
251 251
252 EXPECT_DCHECK_DEATH(it->Next(), ""); 252 EXPECT_DCHECK_DEATH(it->Next());
253 253
254 samples.Accumulate(1, 100); 254 samples.Accumulate(1, 100);
255 it = samples.Iterator(); 255 it = samples.Iterator();
256 EXPECT_FALSE(it->Done()); 256 EXPECT_FALSE(it->Done());
257 } 257 }
258 258
259 } // namespace 259 } // namespace
260 } // namespace base 260 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/histogram_unittest.cc ('k') | base/metrics/sample_map_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698