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

Unified Diff: base/i18n/break_iterator_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/files/file_path.cc ('k') | base/json/json_file_value_serializer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/i18n/break_iterator_unittest.cc
diff --git a/base/i18n/break_iterator_unittest.cc b/base/i18n/break_iterator_unittest.cc
index 856913507548b74f016b4a3a99f0aa922541e883..220a996b961c70e8a164f6fe6cc0f6c7fd7185a3 100644
--- a/base/i18n/break_iterator_unittest.cc
+++ b/base/i18n/break_iterator_unittest.cc
@@ -89,7 +89,7 @@ TEST(BreakIteratorTest, BreakWide16) {
TEST(BreakIteratorTest, BreakWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 2));
@@ -194,7 +194,7 @@ TEST(BreakIteratorTest, BreakSpacekWide16) {
TEST(BreakIteratorTest, BreakSpaceWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s a", very_wide_char)));
const string16 very_wide_word(str.substr(0, 3));
@@ -292,7 +292,7 @@ TEST(BreakIteratorTest, BreakLineWide16) {
TEST(BreakIteratorTest, BreakLineWide32) {
// U+1D49C MATHEMATICAL SCRIPT CAPITAL A
- const char* very_wide_char = "\xF0\x9D\x92\x9C";
+ const char very_wide_char[] = "\xF0\x9D\x92\x9C";
const string16 str(
UTF8ToUTF16(base::StringPrintf("%s\na", very_wide_char)));
const string16 very_wide_line(str.substr(0, 3));
@@ -345,7 +345,7 @@ TEST(BreakIteratorTest, GetStringAfterSetText) {
const string16 long_string(ASCIIToUTF16("another,string"));
EXPECT_TRUE(iter.SetText(long_string.c_str(), long_string.size()));
EXPECT_TRUE(iter.Advance());
- EXPECT_TRUE(iter.Advance()); // Advance to ',' in |long_string|
+ EXPECT_TRUE(iter.Advance()); // Advance to ',' in |long_string|
// Check that the current position is out of bounds of the |initial_string|.
EXPECT_LT(initial_string.size(), iter.pos());
« no previous file with comments | « base/files/file_path.cc ('k') | base/json/json_file_value_serializer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698