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

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

Issue 16331011: Move string files in base/ to the string subdirectory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « base/strings/stringprintf.cc ('k') | no next file » | 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/stringprintf.h"
6
5 #include <errno.h> 7 #include <errno.h>
6 8
7 #include "base/basictypes.h" 9 #include "base/basictypes.h"
8 #include "base/stringprintf.h"
9 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
10 11
11 namespace base { 12 namespace base {
12 13
13 namespace { 14 namespace {
14 15
15 // A helper for the StringAppendV test that follows. 16 // A helper for the StringAppendV test that follows.
16 // 17 //
17 // Just forwards its args to StringAppendV. 18 // Just forwards its args to StringAppendV.
18 static void StringAppendVTestHelper(std::string* out, const char* format, ...) { 19 static void StringAppendVTestHelper(std::string* out, const char* format, ...) {
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 TEST(StringPrintfTest, StringPrintfErrno) { 179 TEST(StringPrintfTest, StringPrintfErrno) {
179 errno = 1; 180 errno = 1;
180 EXPECT_EQ("", StringPrintf("%s", "")); 181 EXPECT_EQ("", StringPrintf("%s", ""));
181 EXPECT_EQ(1, errno); 182 EXPECT_EQ(1, errno);
182 std::string out; 183 std::string out;
183 StringAppendVTestHelper(&out, "%d foo %s", 1, "bar"); 184 StringAppendVTestHelper(&out, "%d foo %s", 1, "bar");
184 EXPECT_EQ(1, errno); 185 EXPECT_EQ(1, errno);
185 } 186 }
186 187
187 } // namespace base 188 } // namespace base
OLDNEW
« no previous file with comments | « base/strings/stringprintf.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698