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

Unified Diff: base/strings/string_util_unittest.cc

Issue 656033009: Convert ARRAYSIZE_UNSAFE -> arraysize in base/. (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 | « base/strings/string_split_unittest.cc ('k') | base/strings/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index d46bc9b84964a1a8fb7cda05388b11a0cc04f06e..a3e899296e270e273cab16064aa3af6175b1528d 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -539,7 +539,7 @@ TEST(StringUtilTest, LowerCaseEqualsASCII) {
{ "FOO", "foo" },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(lowercase_cases); ++i) {
+ for (size_t i = 0; i < arraysize(lowercase_cases); ++i) {
EXPECT_TRUE(LowerCaseEqualsASCII(ASCIIToUTF16(lowercase_cases[i].src_a),
lowercase_cases[i].dst));
EXPECT_TRUE(LowerCaseEqualsASCII(lowercase_cases[i].src_a,
@@ -576,7 +576,7 @@ TEST(StringUtilTest, FormatBytesUnlocalized) {
{100LL*1024*1024*1024, "100 GB"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
EXPECT_EQ(ASCIIToUTF16(cases[i].expected),
FormatBytesUnlocalized(cases[i].bytes));
}
@@ -603,7 +603,7 @@ TEST(StringUtilTest, ReplaceSubstringsAfterOffset) {
{"abababab", 2, "ab", "c", "abccc"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
+ for (size_t i = 0; i < arraysize(cases); i++) {
string16 str = ASCIIToUTF16(cases[i].str);
ReplaceSubstringsAfterOffset(&str, cases[i].start_offset,
ASCIIToUTF16(cases[i].find_this),
@@ -633,7 +633,7 @@ TEST(StringUtilTest, ReplaceFirstSubstringAfterOffset) {
{"abababab", 2, "ab", "c", "abcabab"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); i++) {
+ for (size_t i = 0; i < arraysize(cases); i++) {
string16 str = ASCIIToUTF16(cases[i].str);
ReplaceFirstSubstringAfterOffset(&str, cases[i].start_offset,
ASCIIToUTF16(cases[i].find_this),
@@ -1148,7 +1148,7 @@ TEST(StringUtilTest, WprintfFormatPortabilityTest) {
{ L"% 10s", false },
{ L"% 10ls", true }
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
+ for (size_t i = 0; i < arraysize(cases); ++i)
EXPECT_EQ(cases[i].portable, base::IsWprintfFormatPortable(cases[i].input));
}
@@ -1191,7 +1191,7 @@ TEST(StringUtilTest, ReplaceChars) {
{ "test", "t", "test", "testestest", true },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
std::string output;
bool result = ReplaceChars(cases[i].input,
cases[i].replace_chars,
« no previous file with comments | « base/strings/string_split_unittest.cc ('k') | base/strings/utf_offset_string_conversions_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698