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

Unified Diff: base/json/json_reader_unittest.cc

Issue 632103004: Cleanup: Better constify some strings in base. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix bad refactoring 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/json/json_reader.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/json_reader_unittest.cc
diff --git a/base/json/json_reader_unittest.cc b/base/json/json_reader_unittest.cc
index 67070fff6dab9dbe8e8464bd26e70230ef80f5a2..a3ec4f72e2f8ae6ee1cc2692d72828f2ed27ec54 100644
--- a/base/json/json_reader_unittest.cc
+++ b/base/json/json_reader_unittest.cc
@@ -505,7 +505,7 @@ TEST(JSONReaderTest, Reading) {
EXPECT_EQ("\xf0\x9f\x92\xa9\xf0\x9f\x91\xac", str_val);
// Test invalid utf16 strings.
- const char* cases[] = {
+ const char* const cases[] = {
"\"\\u123\"", // Invalid scalar.
"\"\\ud83d\"", // Invalid scalar.
"\"\\u$%@!\"", // Invalid scalar.
@@ -627,7 +627,7 @@ TEST(JSONReaderTest, StringOptimizations) {
// parser implementation against buffer overflow. Best run with DCHECKs so
// that the one in NextChar fires.
TEST(JSONReaderTest, InvalidSanity) {
- const char* invalid_json[] = {
+ const char* const invalid_json[] = {
"/* test *",
"{\"foo\"",
"{\"foo\":",
« no previous file with comments | « base/json/json_reader.cc ('k') | base/mac/mac_util_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698