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

Unified Diff: base/json/string_escape_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/rtl_unittest.cc ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/json/string_escape_unittest.cc
diff --git a/base/json/string_escape_unittest.cc b/base/json/string_escape_unittest.cc
index 7d82f9bd9b113d10b35df7e74135c2d20bc78100..3eb4e8e5d5590a2159314ba274c830a8d4e8ce47 100644
--- a/base/json/string_escape_unittest.cc
+++ b/base/json/string_escape_unittest.cc
@@ -23,7 +23,7 @@ TEST(JSONStringEscapeTest, EscapeUTF8) {
{"c<>d", "c\\u003C>d"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
const char* in_ptr = cases[i].to_escape;
std::string in_str = in_ptr;
@@ -81,7 +81,7 @@ TEST(JSONStringEscapeTest, EscapeUTF16) {
{L"c<>d", "c\\u003C>d"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
string16 in = WideToUTF16(cases[i].to_escape);
std::string out;
@@ -162,7 +162,7 @@ TEST(JSONStringEscapeTest, EscapeBytes) {
{"\xe5\xc4\x4f\x05\xb6\xfd\0", "\\u00E5\\u00C4O\\u0005\\u00B6\\u00FD"},
};
- for (size_t i = 0; i < ARRAYSIZE_UNSAFE(cases); ++i) {
+ for (size_t i = 0; i < arraysize(cases); ++i) {
std::string in = std::string(cases[i].to_escape);
EXPECT_FALSE(IsStringUTF8(in));
@@ -173,7 +173,7 @@ TEST(JSONStringEscapeTest, EscapeBytes) {
}
const char kEmbedNull[] = { '\xab', '\x39', '\0', '\x9f', '\xab' };
- std::string in(kEmbedNull, ARRAYSIZE_UNSAFE(kEmbedNull));
+ std::string in(kEmbedNull, arraysize(kEmbedNull));
EXPECT_FALSE(IsStringUTF8(in));
EXPECT_EQ(std::string("\\u00AB9\\u0000\\u009F\\u00AB"),
EscapeBytesAsInvalidJSONString(in, false));
« no previous file with comments | « base/i18n/rtl_unittest.cc ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698