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

Unified Diff: base/metrics/histogram_unittest.cc

Issue 1180693002: Update from https://crrev.com/333737 (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebased Created 5 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/metrics/histogram_snapshot_manager.cc ('k') | base/metrics/sample_map.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/metrics/histogram_unittest.cc
diff --git a/base/metrics/histogram_unittest.cc b/base/metrics/histogram_unittest.cc
index df43e65fdef27841af2de2cdeec4bc755c5607cd..2e3a1ee013d60fab879a783c49892744e1614e66 100644
--- a/base/metrics/histogram_unittest.cc
+++ b/base/metrics/histogram_unittest.cc
@@ -2,7 +2,7 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-// Test of Histogram class
+#include "base/metrics/histogram.h"
#include <climits>
#include <algorithm>
@@ -11,15 +11,12 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "base/metrics/bucket_ranges.h"
-#include "base/metrics/histogram.h"
#include "base/metrics/sample_vector.h"
#include "base/metrics/statistics_recorder.h"
#include "base/pickle.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
-using std::vector;
-
namespace base {
class HistogramTest : public testing::Test {
@@ -55,7 +52,7 @@ TEST_F(HistogramTest, BasicTest) {
"TestLinearHistogram", 1, 1000, 10, HistogramBase::kNoFlags);
EXPECT_TRUE(linear_histogram);
- vector<int> custom_ranges;
+ std::vector<int> custom_ranges;
custom_ranges.push_back(1);
custom_ranges.push_back(5);
HistogramBase* custom_histogram = CustomHistogram::FactoryGet(
@@ -157,7 +154,7 @@ TEST_F(HistogramTest, LinearRangesTest) {
TEST_F(HistogramTest, ArrayToCustomRangesTest) {
const HistogramBase::Sample ranges[3] = {5, 10, 20};
- vector<HistogramBase::Sample> ranges_vec =
+ std::vector<HistogramBase::Sample> ranges_vec =
CustomHistogram::ArrayToCustomRanges(ranges, 3);
ASSERT_EQ(6u, ranges_vec.size());
EXPECT_EQ(5, ranges_vec[0]);
@@ -170,7 +167,7 @@ TEST_F(HistogramTest, ArrayToCustomRangesTest) {
TEST_F(HistogramTest, CustomHistogramTest) {
// A well prepared custom ranges.
- vector<HistogramBase::Sample> custom_ranges;
+ std::vector<HistogramBase::Sample> custom_ranges;
custom_ranges.push_back(1);
custom_ranges.push_back(2);
@@ -220,7 +217,7 @@ TEST_F(HistogramTest, CustomHistogramWithOnly2Buckets) {
// We should probably change the restriction on the base class (or not inherit
// the base class!).
- vector<HistogramBase::Sample> custom_ranges;
+ std::vector<HistogramBase::Sample> custom_ranges;
custom_ranges.push_back(4);
Histogram* histogram = static_cast<Histogram*>(
@@ -256,7 +253,7 @@ TEST_F(HistogramTest, BoundsTest) {
EXPECT_EQ(0, samples->GetCountAtIndex(array_size - 2));
EXPECT_EQ(2, samples->GetCountAtIndex(array_size - 1));
- vector<int> custom_ranges;
+ std::vector<int> custom_ranges;
custom_ranges.push_back(10);
custom_ranges.push_back(50);
custom_ranges.push_back(100);
@@ -405,7 +402,7 @@ TEST_F(HistogramTest, HistogramSerializeInfo) {
}
TEST_F(HistogramTest, CustomHistogramSerializeInfo) {
- vector<int> custom_ranges;
+ std::vector<int> custom_ranges;
custom_ranges.push_back(10);
custom_ranges.push_back(100);
@@ -484,7 +481,7 @@ TEST(HistogramDeathTest, BadRangesTest) {
linear_histogram->HasConstructionArguments(
1, HistogramBase::kSampleType_MAX - 1, 8));
- vector<int> custom_ranges;
+ std::vector<int> custom_ranges;
custom_ranges.push_back(0);
custom_ranges.push_back(5);
Histogram* custom_histogram = static_cast<Histogram*>(
« no previous file with comments | « base/metrics/histogram_snapshot_manager.cc ('k') | base/metrics/sample_map.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698