| 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> |
| 8 #include <vector> |
| 9 |
| 10 #include "base/memory/scoped_ptr.h" |
| 7 #include "base/metrics/histogram.h" | 11 #include "base/metrics/histogram.h" |
| 8 #include "base/scoped_ptr.h" | |
| 9 #include "base/time.h" | 12 #include "base/time.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 13 #include "testing/gtest/include/gtest/gtest.h" |
| 11 | 14 |
| 12 namespace base { | 15 namespace base { |
| 13 namespace { | 16 namespace { |
| 14 | 17 |
| 15 class HistogramTest : public testing::Test { | 18 class HistogramTest : public testing::Test { |
| 16 }; | 19 }; |
| 17 | 20 |
| 18 // Check for basic syntax and use. | 21 // Check for basic syntax and use. |
| (...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 if (checksum & 1) | 418 if (checksum & 1) |
| 416 checksum = kReversedPolynomial ^ (checksum >> 1); | 419 checksum = kReversedPolynomial ^ (checksum >> 1); |
| 417 else | 420 else |
| 418 checksum >>= 1; | 421 checksum >>= 1; |
| 419 } | 422 } |
| 420 EXPECT_EQ(Histogram::kCrcTable[i], checksum); | 423 EXPECT_EQ(Histogram::kCrcTable[i], checksum); |
| 421 } | 424 } |
| 422 } | 425 } |
| 423 | 426 |
| 424 } // namespace base | 427 } // namespace base |
| OLD | NEW |