Update answers in get_phone_number_info test.
This commit is contained in:
parent
eeb73d4eb2
commit
8ceeb39f5d
@ -11,7 +11,7 @@
|
||||
|
||||
static void check_phone_number_info(td::string phone_number_prefix, const td::string &country_code,
|
||||
const td::string &calling_code, const td::string &formatted_phone_number) {
|
||||
auto result = td::CountryInfoManager::get_phone_number_info_sync(td::string(), std::move(phone_number_prefix));
|
||||
auto result = td::CountryInfoManager::get_phone_number_info_sync(td::string(), phone_number_prefix);
|
||||
CHECK(result != nullptr);
|
||||
if (result->country_ == nullptr) {
|
||||
CHECK(country_code.empty());
|
||||
@ -19,6 +19,7 @@ static void check_phone_number_info(td::string phone_number_prefix, const td::st
|
||||
CHECK(result->country_->country_code_ == country_code);
|
||||
}
|
||||
CHECK(result->country_calling_code_ == calling_code);
|
||||
// LOG(ERROR) << phone_number_prefix << ' ' << result->formatted_phone_number_ << ' ' << formatted_phone_number;
|
||||
CHECK(result->formatted_phone_number_ == formatted_phone_number);
|
||||
}
|
||||
|
||||
@ -52,7 +53,7 @@ TEST(CountryInfo, phone_number_info) {
|
||||
check_phone_number_info("77654321", "KZ", "7", "765 432 1- --");
|
||||
check_phone_number_info("3", "", "3", "");
|
||||
check_phone_number_info("37", "", "37", "");
|
||||
check_phone_number_info("372", "EE", "372", "---- ----");
|
||||
check_phone_number_info("372", "EE", "372", "---- ---");
|
||||
check_phone_number_info("42", "", "42", "");
|
||||
check_phone_number_info("420", "CZ", "420", "--- --- ---");
|
||||
check_phone_number_info("421", "SK", "421", "--- --- ---");
|
||||
@ -61,27 +62,27 @@ TEST(CountryInfo, phone_number_info) {
|
||||
check_phone_number_info("424", "YL", "42", "4");
|
||||
check_phone_number_info("4241234567890", "YL", "42", "41234567890");
|
||||
check_phone_number_info("4", "", "4", "");
|
||||
check_phone_number_info("49", "DE", "49", "---- -------");
|
||||
check_phone_number_info("491", "DE", "49", "1--- -------");
|
||||
check_phone_number_info("492", "DE", "49", "2--- -------");
|
||||
check_phone_number_info("4915", "DE", "49", "15-- -------");
|
||||
check_phone_number_info("4916", "DE", "49", "16- -------");
|
||||
check_phone_number_info("4917", "DE", "49", "17- -------");
|
||||
check_phone_number_info("4918", "DE", "49", "18-- -------");
|
||||
check_phone_number_info("493", "DE", "49", "3--- -------");
|
||||
check_phone_number_info("4936", "DE", "49", "36-- -------");
|
||||
check_phone_number_info("49360", "DE", "49", "360- -------");
|
||||
check_phone_number_info("493601", "DE", "49", "3601 -------");
|
||||
check_phone_number_info("4936014", "DE", "49", "3601 4------");
|
||||
check_phone_number_info("4936015", "DE", "49", "3601 5------");
|
||||
check_phone_number_info("493601419", "DE", "49", "3601 419----");
|
||||
check_phone_number_info("4936014198", "DE", "49", "3601 4198--");
|
||||
check_phone_number_info("49360141980", "DE", "49", "3601 41980-");
|
||||
check_phone_number_info("49", "DE", "49", "");
|
||||
check_phone_number_info("491", "DE", "49", "1");
|
||||
check_phone_number_info("492", "DE", "49", "2");
|
||||
check_phone_number_info("4915", "DE", "49", "15");
|
||||
check_phone_number_info("4916", "DE", "49", "16");
|
||||
check_phone_number_info("4917", "DE", "49", "17");
|
||||
check_phone_number_info("4918", "DE", "49", "18");
|
||||
check_phone_number_info("493", "DE", "49", "3");
|
||||
check_phone_number_info("4936", "DE", "49", "36");
|
||||
check_phone_number_info("49360", "DE", "49", "360");
|
||||
check_phone_number_info("493601", "DE", "49", "3601");
|
||||
check_phone_number_info("4936014", "DE", "49", "36014");
|
||||
check_phone_number_info("4936015", "DE", "49", "36015");
|
||||
check_phone_number_info("493601419", "DE", "49", "3601419");
|
||||
check_phone_number_info("4936014198", "DE", "49", "36014198");
|
||||
check_phone_number_info("49360141980", "DE", "49", "360141980");
|
||||
check_phone_number_info("841234567890", "VN", "84", "1234567890");
|
||||
check_phone_number_info("31", "NL", "31", "- -- -- -- --");
|
||||
check_phone_number_info("318", "NL", "31", "8 -- -- -- --");
|
||||
check_phone_number_info("319", "NL", "31", "9 -- -- -- --");
|
||||
check_phone_number_info("3196", "NL", "31", "9 6- -- -- --");
|
||||
check_phone_number_info("3197", "NL", "31", "97 ---- -----");
|
||||
check_phone_number_info("3197", "NL", "31", "9 7- -- -- --");
|
||||
check_phone_number_info("3198", "NL", "31", "9 8- -- -- --");
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user