| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" |
| 10 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 11 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram.h" |
| 13 #include "base/metrics/statistics_recorder.h" |
| 12 #include "base/time.h" | 14 #include "base/time.h" |
| 13 #include "testing/gtest/include/gtest/gtest.h" | 15 #include "testing/gtest/include/gtest/gtest.h" |
| 14 | 16 |
| 15 namespace base { | 17 namespace base { |
| 16 namespace { | 18 namespace { |
| 17 | 19 |
| 18 class HistogramTest : public testing::Test { | 20 class HistogramTest : public testing::Test { |
| 19 }; | 21 }; |
| 20 | 22 |
| 21 // Check for basic syntax and use. | 23 // Check for basic syntax and use. |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 444 "Histogram3", 1, 64, 16, Histogram::kNoFlags)); | 446 "Histogram3", 1, 64, 16, Histogram::kNoFlags)); |
| 445 | 447 |
| 446 CachedRanges* cached_ranges1 = histogram1->cached_ranges(); | 448 CachedRanges* cached_ranges1 = histogram1->cached_ranges(); |
| 447 CachedRanges* cached_ranges2 = histogram2->cached_ranges(); | 449 CachedRanges* cached_ranges2 = histogram2->cached_ranges(); |
| 448 CachedRanges* cached_ranges3 = histogram3->cached_ranges(); | 450 CachedRanges* cached_ranges3 = histogram3->cached_ranges(); |
| 449 EXPECT_TRUE(cached_ranges1->Equals(cached_ranges2)); | 451 EXPECT_TRUE(cached_ranges1->Equals(cached_ranges2)); |
| 450 EXPECT_FALSE(cached_ranges1->Equals(cached_ranges3)); | 452 EXPECT_FALSE(cached_ranges1->Equals(cached_ranges3)); |
| 451 } | 453 } |
| 452 | 454 |
| 453 } // namespace base | 455 } // namespace base |
| OLD | NEW |