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

Side by Side Diff: base/metrics/sample_vector_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/sample_map_unittest.cc ('k') | base/numerics/safe_numerics_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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/sample_vector.h" 5 #include "base/metrics/sample_vector.h"
6 6
7 #include <limits.h> 7 #include <limits.h>
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
270 ranges.set_range(4, INT_MAX); 270 ranges.set_range(4, INT_MAX);
271 SampleVector samples(1, &ranges); 271 SampleVector samples(1, &ranges);
272 272
273 std::unique_ptr<SampleCountIterator> it = samples.Iterator(); 273 std::unique_ptr<SampleCountIterator> it = samples.Iterator();
274 274
275 EXPECT_TRUE(it->Done()); 275 EXPECT_TRUE(it->Done());
276 276
277 HistogramBase::Sample min; 277 HistogramBase::Sample min;
278 HistogramBase::Sample max; 278 HistogramBase::Sample max;
279 HistogramBase::Count count; 279 HistogramBase::Count count;
280 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count), ""); 280 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
281 281
282 EXPECT_DCHECK_DEATH(it->Next(), ""); 282 EXPECT_DCHECK_DEATH(it->Next());
283 283
284 samples.Accumulate(2, 100); 284 samples.Accumulate(2, 100);
285 it = samples.Iterator(); 285 it = samples.Iterator();
286 EXPECT_FALSE(it->Done()); 286 EXPECT_FALSE(it->Done());
287 } 287 }
288 288
289 } // namespace 289 } // namespace
290 } // namespace base 290 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/sample_map_unittest.cc ('k') | base/numerics/safe_numerics_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698