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

Side by Side Diff: base/bits_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/bind_unittest.cc ('k') | base/build_time_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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 // This file contains the unit tests for the bit utilities. 5 // This file contains the unit tests for the bit utilities.
6 6
7 #include "base/bits.h" 7 #include "base/bits.h"
8 8
9 #include <limits> 9 #include <limits>
10 10
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/googletest/include/gtest/gtest.h"
12 12
13 namespace base { 13 namespace base {
14 namespace bits { 14 namespace bits {
15 15
16 TEST(BitsTest, Log2Floor) { 16 TEST(BitsTest, Log2Floor) {
17 EXPECT_EQ(-1, Log2Floor(0)); 17 EXPECT_EQ(-1, Log2Floor(0));
18 EXPECT_EQ(0, Log2Floor(1)); 18 EXPECT_EQ(0, Log2Floor(1));
19 EXPECT_EQ(1, Log2Floor(2)); 19 EXPECT_EQ(1, Log2Floor(2));
20 EXPECT_EQ(1, Log2Floor(3)); 20 EXPECT_EQ(1, Log2Floor(3));
21 EXPECT_EQ(2, Log2Floor(4)); 21 EXPECT_EQ(2, Log2Floor(4));
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 EXPECT_EQ(4096ul, Align(1, 4096)); 54 EXPECT_EQ(4096ul, Align(1, 4096));
55 EXPECT_EQ(4096ul, Align(4096, 4096)); 55 EXPECT_EQ(4096ul, Align(4096, 4096));
56 EXPECT_EQ(4096ul, Align(4095, 4096)); 56 EXPECT_EQ(4096ul, Align(4095, 4096));
57 EXPECT_EQ(8192ul, Align(4097, 4096)); 57 EXPECT_EQ(8192ul, Align(4097, 4096));
58 EXPECT_EQ(kSizeTMax - 31, Align(kSizeTMax - 62, 32)); 58 EXPECT_EQ(kSizeTMax - 31, Align(kSizeTMax - 62, 32));
59 EXPECT_EQ(kSizeTMax / 2 + 1, Align(1, kSizeTMax / 2 + 1)); 59 EXPECT_EQ(kSizeTMax / 2 + 1, Align(1, kSizeTMax / 2 + 1));
60 } 60 }
61 61
62 } // namespace bits 62 } // namespace bits
63 } // namespace base 63 } // namespace base
OLDNEW
« no previous file with comments | « base/bind_unittest.cc ('k') | base/build_time_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698