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

Unified Diff: components/autofill/core/browser/address_unittest.cc

Issue 2424793002: Revert of Replace for loops with |arraysize| with for each loops (Closed)
Patch Set: Created 4 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
Index: components/autofill/core/browser/address_unittest.cc
diff --git a/components/autofill/core/browser/address_unittest.cc b/components/autofill/core/browser/address_unittest.cc
index d5e67b017208f4464ad0e065ade9de8971af8233..d178f04ff2143744e29357b2977c50d7e7bf75fd 100644
--- a/components/autofill/core/browser/address_unittest.cc
+++ b/components/autofill/core/browser/address_unittest.cc
@@ -132,10 +132,11 @@
"United states",
"us"
};
- for (const char* valid_match : kValidMatches) {
- SCOPED_TRACE(valid_match);
+ for (size_t i = 0; i < arraysize(kValidMatches); ++i) {
+ SCOPED_TRACE(kValidMatches[i]);
ServerFieldTypeSet matching_types;
- address.GetMatchingTypes(ASCIIToUTF16(valid_match), "US", &matching_types);
+ address.GetMatchingTypes(ASCIIToUTF16(kValidMatches[i]), "US",
+ &matching_types);
ASSERT_EQ(1U, matching_types.size());
EXPECT_EQ(ADDRESS_HOME_COUNTRY, *matching_types.begin());
}
@@ -144,9 +145,9 @@
"United",
"Garbage"
};
- for (const char* invalid_match : kInvalidMatches) {
+ for (size_t i = 0; i < arraysize(kInvalidMatches); ++i) {
ServerFieldTypeSet matching_types;
- address.GetMatchingTypes(ASCIIToUTF16(invalid_match), "US",
+ address.GetMatchingTypes(ASCIIToUTF16(kInvalidMatches[i]), "US",
&matching_types);
EXPECT_EQ(0U, matching_types.size());
}
« no previous file with comments | « components/autofill/core/browser/address_i18n_unittest.cc ('k') | components/autofill/core/browser/autofill_data_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698