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

Unified Diff: base/i18n/rtl_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/i18n/number_formatting_unittest.cc ('k') | base/json/string_escape_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/rtl_unittest.cc
diff --git a/base/i18n/rtl_unittest.cc b/base/i18n/rtl_unittest.cc
index 2d923acf0ba8b7872e77e074c85e2fff310023a2..87ac87d242a7a8ec01ff370f96d8e137795d2966 100644
--- a/base/i18n/rtl_unittest.cc
+++ b/base/i18n/rtl_unittest.cc
@@ -96,7 +96,7 @@ TEST_F(RTLTest, GetFirstStrongCharacterDirection) {
LEFT_TO_RIGHT },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
+ for (size_t i = 0; i < arraysize(cases); ++i)
EXPECT_EQ(cases[i].direction,
GetFirstStrongCharacterDirection(WideToUTF16(cases[i].text)));
}
@@ -158,7 +158,7 @@ TEST_F(RTLTest, GetLastStrongCharacterDirection) {
LEFT_TO_RIGHT },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
+ for (size_t i = 0; i < arraysize(cases); ++i)
EXPECT_EQ(cases[i].direction,
GetLastStrongCharacterDirection(WideToUTF16(cases[i].text)));
}
@@ -236,7 +236,7 @@ TEST_F(RTLTest, GetStringDirection) {
LEFT_TO_RIGHT },
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i)
+ for (size_t i = 0; i < arraysize(cases); ++i)
EXPECT_EQ(cases[i].direction,
GetStringDirection(WideToUTF16(cases[i].text)));
}
@@ -355,7 +355,7 @@ TEST_F(RTLTest, GetDisplayStringInLTRDirectionality) {
for (size_t i = 0; i < 2; ++i) {
// Toggle the application default text direction (to try each direction).
SetRTL(!IsRTL());
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
string16 input = WideToUTF16(cases[i].path);
string16 output = GetDisplayStringInLTRDirectionality(input);
// Test the expected wrapping behavior for the current UI directionality.
« no previous file with comments | « base/i18n/number_formatting_unittest.cc ('k') | base/json/string_escape_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698