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

Side by Side Diff: base/strings/string_number_conversions_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/strings/string16_unittest.cc ('k') | base/strings/string_piece_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/strings/string_number_conversions.h" 5 #include "base/strings/string_number_conversions.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <stdio.h> 9 #include <stdio.h>
10 10
11 #include <cmath> 11 #include <cmath>
12 #include <limits> 12 #include <limits>
13 13
14 #include "base/format_macros.h" 14 #include "base/format_macros.h"
15 #include "base/strings/stringprintf.h" 15 #include "base/strings/stringprintf.h"
16 #include "base/strings/utf_string_conversions.h" 16 #include "base/strings/utf_string_conversions.h"
17 #include "testing/gtest/include/gtest/gtest.h" 17 #include "testing/gtest/googletest/include/gtest/gtest.h"
18 18
19 namespace base { 19 namespace base {
20 20
21 namespace { 21 namespace {
22 22
23 template <typename INT> 23 template <typename INT>
24 struct IntToStringTest { 24 struct IntToStringTest {
25 INT num; 25 INT num;
26 const char* sexpected; 26 const char* sexpected;
27 const char* uexpected; 27 const char* uexpected;
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after
787 787
788 TEST(StringNumberConversionsTest, HexEncode) { 788 TEST(StringNumberConversionsTest, HexEncode) {
789 std::string hex(HexEncode(NULL, 0)); 789 std::string hex(HexEncode(NULL, 0));
790 EXPECT_EQ(hex.length(), 0U); 790 EXPECT_EQ(hex.length(), 0U);
791 unsigned char bytes[] = {0x01, 0xff, 0x02, 0xfe, 0x03, 0x80, 0x81}; 791 unsigned char bytes[] = {0x01, 0xff, 0x02, 0xfe, 0x03, 0x80, 0x81};
792 hex = HexEncode(bytes, sizeof(bytes)); 792 hex = HexEncode(bytes, sizeof(bytes));
793 EXPECT_EQ(hex.compare("01FF02FE038081"), 0); 793 EXPECT_EQ(hex.compare("01FF02FE038081"), 0);
794 } 794 }
795 795
796 } // namespace base 796 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/string16_unittest.cc ('k') | base/strings/string_piece_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698