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

Side by Side Diff: base/metrics/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/persistent_sample_map_unittest.cc ('k') | base/metrics/sample_vector_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_map.h" 5 #include "base/metrics/sample_map.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/test/gtest_util.h" 9 #include "base/test/gtest_util.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 TEST(SampleMapIteratorDeathTest, IterateDoneTest) { 148 TEST(SampleMapIteratorDeathTest, IterateDoneTest) {
149 SampleMap samples(1); 149 SampleMap samples(1);
150 150
151 std::unique_ptr<SampleCountIterator> it = samples.Iterator(); 151 std::unique_ptr<SampleCountIterator> it = samples.Iterator();
152 152
153 EXPECT_TRUE(it->Done()); 153 EXPECT_TRUE(it->Done());
154 154
155 HistogramBase::Sample min; 155 HistogramBase::Sample min;
156 HistogramBase::Sample max; 156 HistogramBase::Sample max;
157 HistogramBase::Count count; 157 HistogramBase::Count count;
158 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count), ""); 158 EXPECT_DCHECK_DEATH(it->Get(&min, &max, &count));
159 159
160 EXPECT_DCHECK_DEATH(it->Next(), ""); 160 EXPECT_DCHECK_DEATH(it->Next());
161 161
162 samples.Accumulate(1, 100); 162 samples.Accumulate(1, 100);
163 it = samples.Iterator(); 163 it = samples.Iterator();
164 EXPECT_FALSE(it->Done()); 164 EXPECT_FALSE(it->Done());
165 } 165 }
166 166
167 } // namespace 167 } // namespace
168 } // namespace base 168 } // namespace base
OLDNEW
« 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