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

Unified Diff: net/ftp/ftp_util_unittest.cc

Issue 662553002: Convert ARRAYSIZE_UNSAFE -> arraysize in net/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/ftp/ftp_directory_listing_parser.cc ('k') | net/http/http_auth_handler_basic_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_util_unittest.cc
diff --git a/net/ftp/ftp_util_unittest.cc b/net/ftp/ftp_util_unittest.cc
index 5851e88a6ef582310192c07663c9122f7c1704f4..a2b28498374ee6a9b1e6285d2fcf393a3327257c 100644
--- a/net/ftp/ftp_util_unittest.cc
+++ b/net/ftp/ftp_util_unittest.cc
@@ -34,7 +34,7 @@ TEST(FtpUtilTest, UnixFilePathToVMS) {
{ "a/b/c", "[.a.b]c" },
{ "a/b/c/d", "[.a.b.c]d" },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
EXPECT_EQ(kTestCases[i].expected_output,
net::FtpUtil::UnixFilePathToVMS(kTestCases[i].input))
<< kTestCases[i].input;
@@ -67,7 +67,7 @@ TEST(FtpUtilTest, UnixDirectoryPathToVMS) {
{ "a/b/c/d", "[.a.b.c.d]" },
{ "a/b/c/d/", "[.a.b.c.d]" },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
EXPECT_EQ(kTestCases[i].expected_output,
net::FtpUtil::UnixDirectoryPathToVMS(kTestCases[i].input))
<< kTestCases[i].input;
@@ -107,7 +107,7 @@ TEST(FtpUtilTest, VMSPathToUnix) {
{ "/a/b/c", "/a/b/c" },
{ "/a/b/c/d", "/a/b/c/d" },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
EXPECT_EQ(kTestCases[i].expected_output,
net::FtpUtil::VMSPathToUnix(kTestCases[i].input))
<< kTestCases[i].input;
@@ -163,7 +163,7 @@ TEST(FtpUtilTest, LsDateListingToTime) {
{ "Sep", "02", "09:00", 1994, 9, 2, 9, 0 },
{ "Dec", "06", "21:00", 1993, 12, 6, 21, 0 },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s %s %s", i,
kTestCases[i].month, kTestCases[i].day,
kTestCases[i].rest));
@@ -204,7 +204,7 @@ TEST(FtpUtilTest, WindowsDateListingToTime) {
{ "11-01-2007", "12:42", 2007, 11, 1, 12, 42 },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s %s", i,
kTestCases[i].date, kTestCases[i].time));
@@ -243,7 +243,7 @@ TEST(FtpUtilTest, GetStringPartAfterColumns) {
{ " foo abc ", 1, "abc" },
{ " foo abc ", 2, "" },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(kTestCases); i++) {
+ for (size_t i = 0; i < arraysize(kTestCases); i++) {
SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s %d", i,
kTestCases[i].text, kTestCases[i].column));
« no previous file with comments | « net/ftp/ftp_directory_listing_parser.cc ('k') | net/http/http_auth_handler_basic_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698