Chromium Code Reviews| Index: base/debug/crash_logging_unittest.cc |
| diff --git a/base/debug/crash_logging_unittest.cc b/base/debug/crash_logging_unittest.cc |
| index 8c252f02d809cffa58a7a5b861f94cc0d440321c..cb11f13f193240886749db390f947046e6f05f82 100644 |
| --- a/base/debug/crash_logging_unittest.cc |
| +++ b/base/debug/crash_logging_unittest.cc |
| @@ -44,7 +44,7 @@ class CrashLoggingTest : public testing::Test { |
| }; |
| TEST_F(CrashLoggingTest, SetClearSingle) { |
| - const char* kTestKey = "test-key"; |
| + const char kTestKey[] = "test-key"; |
|
danakj
2014/10/07 17:13:54
What's the benefit of this change?
Lei Zhang
2014/10/17 21:19:38
To avoid the possibility of stupid errors like bel
danakj
2014/10/18 18:47:36
Oh, cool didn't realize const char[] made the vari
|
| base::debug::CrashKey keys[] = { { kTestKey, 255 } }; |
| base::debug::InitCrashKeys(keys, arraysize(keys), 255); |
| @@ -56,10 +56,10 @@ TEST_F(CrashLoggingTest, SetClearSingle) { |
| } |
| TEST_F(CrashLoggingTest, SetChunked) { |
| - const char* kTestKey = "chunky"; |
| - const char* kChunk1 = "chunky-1"; |
| - const char* kChunk2 = "chunky-2"; |
| - const char* kChunk3 = "chunky-3"; |
| + const char kTestKey[] = "chunky"; |
| + const char kChunk1[] = "chunky-1"; |
| + const char kChunk2[] = "chunky-2"; |
| + const char kChunk3[] = "chunky-3"; |
| base::debug::CrashKey keys[] = { { kTestKey, 15 } }; |
| base::debug::InitCrashKeys(keys, arraysize(keys), 5); |
| @@ -104,7 +104,7 @@ TEST_F(CrashLoggingTest, SetChunked) { |
| } |
| TEST_F(CrashLoggingTest, ScopedCrashKey) { |
| - const char* kTestKey = "test-key"; |
| + const char kTestKey[] = "test-key"; |
| base::debug::CrashKey keys[] = { { kTestKey, 255 } }; |
| base::debug::InitCrashKeys(keys, arraysize(keys), 255); |