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

Side by Side Diff: base/strings/stringprintf_unittest.cc

Issue 1548993002: Switch to standard integer types in base/strings/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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 unified diff | Download patch
« no previous file with comments | « base/strings/stringprintf.cc ('k') | base/strings/sys_string_conversions.h » ('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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/stringprintf.h" 5 #include "base/strings/stringprintf.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stddef.h>
8 9
9 #include "base/basictypes.h" 10 #include "base/macros.h"
11 #include "build/build_config.h"
10 #include "testing/gtest/include/gtest/gtest.h" 12 #include "testing/gtest/include/gtest/gtest.h"
11 13
12 namespace base { 14 namespace base {
13 15
14 namespace { 16 namespace {
15 17
16 // A helper for the StringAppendV test that follows. 18 // A helper for the StringAppendV test that follows.
17 // 19 //
18 // Just forwards its args to StringAppendV. 20 // Just forwards its args to StringAppendV.
19 static void StringAppendVTestHelper(std::string* out, const char* format, ...) { 21 static void StringAppendVTestHelper(std::string* out, const char* format, ...) {
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 TEST(StringPrintfTest, StringPrintfErrno) { 173 TEST(StringPrintfTest, StringPrintfErrno) {
172 errno = 1; 174 errno = 1;
173 EXPECT_EQ("", StringPrintf("%s", "")); 175 EXPECT_EQ("", StringPrintf("%s", ""));
174 EXPECT_EQ(1, errno); 176 EXPECT_EQ(1, errno);
175 std::string out; 177 std::string out;
176 StringAppendVTestHelper(&out, "%d foo %s", 1, "bar"); 178 StringAppendVTestHelper(&out, "%d foo %s", 1, "bar");
177 EXPECT_EQ(1, errno); 179 EXPECT_EQ(1, errno);
178 } 180 }
179 181
180 } // namespace base 182 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/stringprintf.cc ('k') | base/strings/sys_string_conversions.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698