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

Side by Side Diff: base/metrics/sample_vector_unittest.cc

Issue 1466413002: Update gtest to 786564fa4a3c, switch to googlemock in gtest Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 unified diff | Download patch
« no previous file with comments | « base/metrics/sample_map_unittest.cc ('k') | base/metrics/sparse_histogram_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <vector> 7 #include <vector>
8 8
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/metrics/bucket_ranges.h" 10 #include "base/metrics/bucket_ranges.h"
11 #include "base/metrics/histogram.h" 11 #include "base/metrics/histogram.h"
12 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/googletest/include/gtest/gtest.h"
13 13
14 namespace base { 14 namespace base {
15 namespace { 15 namespace {
16 16
17 TEST(SampleVectorTest, AccumulateTest) { 17 TEST(SampleVectorTest, AccumulateTest) {
18 // Custom buckets: [1, 5) [5, 10) 18 // Custom buckets: [1, 5) [5, 10)
19 BucketRanges ranges(3); 19 BucketRanges ranges(3);
20 ranges.set_range(0, 1); 20 ranges.set_range(0, 1);
21 ranges.set_range(1, 5); 21 ranges.set_range(1, 5);
22 ranges.set_range(2, 10); 22 ranges.set_range(2, 10);
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 samples.Accumulate(2, 100); 255 samples.Accumulate(2, 100);
256 it = samples.Iterator(); 256 it = samples.Iterator();
257 EXPECT_FALSE(it->Done()); 257 EXPECT_FALSE(it->Done());
258 } 258 }
259 259
260 #endif 260 #endif
261 // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST 261 // (!defined(NDEBUG) || defined(DCHECK_ALWAYS_ON)) && GTEST_HAS_DEATH_TEST
262 262
263 } // namespace 263 } // namespace
264 } // namespace base 264 } // namespace base
OLDNEW
« no previous file with comments | « base/metrics/sample_map_unittest.cc ('k') | base/metrics/sparse_histogram_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698