diff options
author | viettrungluu <viettrungluu@chromium.org> | 2014-10-15 21:02:49 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-16 04:03:06 +0000 |
commit | 805eabb91d386c86bd64336c7643f6dfa864151d (patch) | |
tree | 843a45e9bd0ec5a3aa22dc317a811d155a90c947 /base/json | |
parent | 4b691586093fae3feb41fa39e345c42a4ce66932 (diff) | |
download | chromium_src-805eabb91d386c86bd64336c7643f6dfa864151d.zip chromium_src-805eabb91d386c86bd64336c7643f6dfa864151d.tar.gz chromium_src-805eabb91d386c86bd64336c7643f6dfa864151d.tar.bz2 |
Convert ARRAYSIZE_UNSAFE -> arraysize in base/.
R=thestig@chromium.org
BUG=423134
Review URL: https://codereview.chromium.org/656033009
Cr-Commit-Position: refs/heads/master@{#299835}
Diffstat (limited to 'base/json')
-rw-r--r-- | base/json/string_escape_unittest.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/base/json/string_escape_unittest.cc b/base/json/string_escape_unittest.cc index 7d82f9b..3eb4e8e 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)); |