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

Unified Diff: components/autofill/core/browser/phone_number_i18n_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/phone_number_i18n_unittest.cc
diff --git a/components/autofill/core/browser/phone_number_i18n_unittest.cc b/components/autofill/core/browser/phone_number_i18n_unittest.cc
index 240319e166325b5a9e1dd5b7bb620669dc125e5c..39054690f06be17a36e42acd9b4d3b23be2c6e0a 100644
--- a/components/autofill/core/browser/phone_number_i18n_unittest.cc
+++ b/components/autofill/core/browser/phone_number_i18n_unittest.cc
@@ -124,21 +124,24 @@
{true, "(08) 450 777 7777", "DE", "7777777", "8450", "", "DE"},
};
- for (const auto& test_case : test_cases) {
- SCOPED_TRACE("Testing phone number " + test_case.input);
+ for (size_t i = 0; i < arraysize(test_cases); ++i) {
+ SCOPED_TRACE("Testing phone number " + test_cases[i].input);
base::string16 country_code, city_code, number;
std::string deduced_region;
::i18n::phonenumbers::PhoneNumber unused_i18n_number;
- EXPECT_EQ(
- test_case.valid,
- ParsePhoneNumber(ASCIIToUTF16(test_case.input),
- test_case.assumed_region, &country_code, &city_code,
- &number, &deduced_region, &unused_i18n_number));
- EXPECT_EQ(ASCIIToUTF16(test_case.number), number);
- EXPECT_EQ(ASCIIToUTF16(test_case.city_code), city_code);
- EXPECT_EQ(ASCIIToUTF16(test_case.country_code), country_code);
- EXPECT_EQ(test_case.deduced_region, deduced_region);
+ EXPECT_EQ(test_cases[i].valid,
+ ParsePhoneNumber(ASCIIToUTF16(test_cases[i].input),
+ test_cases[i].assumed_region,
+ &country_code,
+ &city_code,
+ &number,
+ &deduced_region,
+ &unused_i18n_number));
+ EXPECT_EQ(ASCIIToUTF16(test_cases[i].number), number);
+ EXPECT_EQ(ASCIIToUTF16(test_cases[i].city_code), city_code);
+ EXPECT_EQ(ASCIIToUTF16(test_cases[i].country_code), country_code);
+ EXPECT_EQ(test_cases[i].deduced_region, deduced_region);
}
}
« no previous file with comments | « components/autofill/core/browser/phone_field_unittest.cc ('k') | components/autofill/core/browser/state_names.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698