| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 // Test of Histogram class | 5 // Test of Histogram class |
| 6 | 6 |
| 7 #include "base/histogram.h" | 7 #include "base/histogram.h" |
| 8 #include "base/string_util.h" | |
| 9 #include "base/time.h" | 8 #include "base/time.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 9 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 10 |
| 12 using base::TimeDelta; | 11 using base::TimeDelta; |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 class HistogramTest : public testing::Test { | 15 class HistogramTest : public testing::Test { |
| 17 }; | 16 }; |
| 18 | 17 |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 304 // Check to see that the bucket counts reflect our additions. | 303 // Check to see that the bucket counts reflect our additions. |
| 305 Histogram::SampleSet sample; | 304 Histogram::SampleSet sample; |
| 306 histogram->SnapshotSample(&sample); | 305 histogram->SnapshotSample(&sample); |
| 307 EXPECT_EQ(INT_MAX, histogram->ranges(8)); | 306 EXPECT_EQ(INT_MAX, histogram->ranges(8)); |
| 308 for (int i = 0; i < 8; i++) | 307 for (int i = 0; i < 8; i++) |
| 309 EXPECT_EQ(i + 1, sample.counts(i)); | 308 EXPECT_EQ(i + 1, sample.counts(i)); |
| 310 } | 309 } |
| 311 | 310 |
| 312 | 311 |
| 313 } // namespace | 312 } // namespace |
| OLD | NEW |