| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |