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

Unified Diff: components/update_client/utils_unittest.cc

Issue 2110663002: components: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase+one fix Created 4 years, 5 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 | « components/update_client/update_engine.cc ('k') | components/zoom/zoom_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/update_client/utils_unittest.cc
diff --git a/components/update_client/utils_unittest.cc b/components/update_client/utils_unittest.cc
index 5865419e67aeb16c636f37ce06bd7f6e23ff8c9c..4609b7f656f61b7234347736695e585f859631fb 100644
--- a/components/update_client/utils_unittest.cc
+++ b/components/update_client/utils_unittest.cc
@@ -94,14 +94,14 @@ TEST(UpdateClientUtils, IsValidInstallerAttributeName) {
const char* const valid_names[] = {"A", "Z", "a", "a-b", "A_B",
"z", "0", "9", "-_"};
- for (const auto& name : valid_names)
+ for (const char* name : valid_names)
EXPECT_TRUE(IsValidInstallerAttribute(
make_pair(std::string(name), std::string("value"))));
const char* const invalid_names[] = {
"", "a=1", " name", "name ", "na me", "<name", "name>",
"\"", "\\", "\xaa", ".", ",", ";", "+"};
- for (const auto& name : invalid_names)
+ for (const char* name : invalid_names)
EXPECT_FALSE(IsValidInstallerAttribute(
make_pair(std::string(name), std::string("value"))));
}
@@ -119,13 +119,13 @@ TEST(UpdateClientUtils, IsValidInstallerAttributeValue) {
const char* const valid_values[] = {"", "a=1", "A", "Z", "a",
"z", "0", "9", "-.,;+_="};
- for (const auto& value : valid_values)
+ for (const char* value : valid_values)
EXPECT_TRUE(IsValidInstallerAttribute(
make_pair(std::string("name"), std::string(value))));
const char* const invalid_values[] = {" ap", "ap ", "a p", "<ap",
"ap>", "\"", "\\", "\xaa"};
- for (const auto& value : invalid_values)
+ for (const char* value : invalid_values)
EXPECT_FALSE(IsValidInstallerAttribute(
make_pair(std::string("name"), std::string(value))));
}
« no previous file with comments | « components/update_client/update_engine.cc ('k') | components/zoom/zoom_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698