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

Side by Side Diff: net/ftp/ftp_util_unittest.cc

Issue 6903022: Removed wchar_t from Time::FromString (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Removed unnecessary blankline. Created 9 years, 4 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 | « chrome/common/metrics_helpers.cc ('k') | net/http/http_response_headers.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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "net/ftp/ftp_util.h" 5 #include "net/ftp/ftp_util.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/format_macros.h" 8 #include "base/format_macros.h"
9 #include "base/string_util.h" 9 #include "base/string_util.h"
10 #include "base/stringprintf.h" 10 #include "base/stringprintf.h"
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 }; 99 };
100 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) { 100 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
101 EXPECT_EQ(kTestCases[i].expected_output, 101 EXPECT_EQ(kTestCases[i].expected_output,
102 net::FtpUtil::VMSPathToUnix(kTestCases[i].input)) 102 net::FtpUtil::VMSPathToUnix(kTestCases[i].input))
103 << kTestCases[i].input; 103 << kTestCases[i].input;
104 } 104 }
105 } 105 }
106 106
107 TEST(FtpUtilTest, LsDateListingToTime) { 107 TEST(FtpUtilTest, LsDateListingToTime) {
108 base::Time mock_current_time; 108 base::Time mock_current_time;
109 ASSERT_TRUE(base::Time::FromString(L"Tue, 15 Nov 1994 12:45:26 GMT", 109 ASSERT_TRUE(base::Time::FromString("Tue, 15 Nov 1994 12:45:26 GMT",
110 &mock_current_time)); 110 &mock_current_time));
111 111
112 const struct { 112 const struct {
113 // Input. 113 // Input.
114 const char* month; 114 const char* month;
115 const char* day; 115 const char* day;
116 const char* rest; 116 const char* rest;
117 117
118 // Expected output. 118 // Expected output.
119 int expected_year; 119 int expected_year;
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
196 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s %d", i, 196 SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s %d", i,
197 kTestCases[i].text, kTestCases[i].column)); 197 kTestCases[i].text, kTestCases[i].column));
198 198
199 EXPECT_EQ(ASCIIToUTF16(kTestCases[i].expected_result), 199 EXPECT_EQ(ASCIIToUTF16(kTestCases[i].expected_result),
200 net::FtpUtil::GetStringPartAfterColumns( 200 net::FtpUtil::GetStringPartAfterColumns(
201 ASCIIToUTF16(kTestCases[i].text), kTestCases[i].column)); 201 ASCIIToUTF16(kTestCases[i].text), kTestCases[i].column));
202 } 202 }
203 } 203 }
204 204
205 } // namespace 205 } // namespace
OLDNEW
« no previous file with comments | « chrome/common/metrics_helpers.cc ('k') | net/http/http_response_headers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698