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

Unified Diff: base/strings/string_util_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/prefs/overlay_user_pref_store_unittest.cc ('k') | base/strings/stringprintf_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/strings/string_util_unittest.cc
diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
index a3e899296e270e273cab16064aa3af6175b1528d..f29baac17b45d693d4c0b5a1f37e0f9248815ac3 100644
--- a/base/strings/string_util_unittest.cc
+++ b/base/strings/string_util_unittest.cc
@@ -461,7 +461,7 @@ TEST(StringUtilTest, IsStringASCII) {
}
TEST(StringUtilTest, ConvertASCII) {
- static const char* char_cases[] = {
+ static const char* const char_cases[] = {
"Google Video",
"Hello, world\n",
"0123ABCDwxyz \a\b\t\r\n!+,.~"
@@ -566,7 +566,7 @@ TEST(StringUtilTest, FormatBytesUnlocalized) {
{99LL*1024*1024*1024, "99.0 GB"},
{105LL*1024*1024*1024, "105 GB"},
{105LL*1024*1024*1024 + 500LL*1024*1024, "105 GB"},
- {~(1LL<<63), "8192 PB"},
+ {~(1LL << 63), "8192 PB"},
{99*1024 + 103, "99.1 kB"},
{1024*1024 + 103, "1.0 MB"},
@@ -1153,7 +1153,7 @@ TEST(StringUtilTest, WprintfFormatPortabilityTest) {
}
TEST(StringUtilTest, RemoveChars) {
- const char* kRemoveChars = "-/+*";
+ const char kRemoveChars[] = "-/+*";
std::string input = "A-+bc/d!*";
EXPECT_TRUE(RemoveChars(input, kRemoveChars, &input));
EXPECT_EQ("Abcd!", input);
« no previous file with comments | « base/prefs/overlay_user_pref_store_unittest.cc ('k') | base/strings/stringprintf_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698