Lines Matching refs:result

82                                          struct addrinfo** result);
110 addrinfo* result = nullptr; in safe_getaddrinfo() local
111 if (getaddrinfo(node, service, hints, &result) != 0) { in safe_getaddrinfo()
112 result = nullptr; // Should already be the case, but... in safe_getaddrinfo()
114 return ScopedAddrinfo(result); in safe_getaddrinfo()
120 ScopedAddrinfo result = safe_getaddrinfo(node, service, &hints); in safe_getaddrinfo_time_taken() local
121 return {std::move(result), s.timeTakenUs() / 1000}; in safe_getaddrinfo_time_taken()
377 const hostent* result; in TEST_F() local
378 result = gethostbyname("nonexistent"); in TEST_F()
380 ASSERT_TRUE(result == nullptr); in TEST_F()
384 result = gethostbyname("hello"); in TEST_F()
386 ASSERT_FALSE(result == nullptr); in TEST_F()
387 ASSERT_EQ(4, result->h_length); in TEST_F()
388 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
389 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
390 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
413 const hostent* result; in TEST_F() local
414 result = gethostbyname2("hello", AF_INET); in TEST_F()
415 ASSERT_FALSE(result == nullptr); in TEST_F()
417 for (int i = 0; result != nullptr && result->h_aliases[i] != nullptr; i++) { in TEST_F()
419 EXPECT_EQ(result->h_aliases[i], domain_name); in TEST_F()
424 ASSERT_EQ(4, result->h_length); in TEST_F()
425 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
426 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
427 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
434 result = gethostbyname2("hello", AF_INET6); in TEST_F()
435 for (unsigned i = 0; result != nullptr && result->h_aliases[i] != nullptr; i++) { in TEST_F()
437 EXPECT_EQ(result->h_aliases[i], domain_name); in TEST_F()
442 ASSERT_FALSE(result == nullptr); in TEST_F()
443 ASSERT_EQ(16, result->h_length); in TEST_F()
444 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
445 EXPECT_EQ("2001:db8::42", ToString(result)); in TEST_F()
446 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
458 const hostent* result; in TEST_F() local
459 result = gethostbyname2("hello", AF_INET); in TEST_F()
460 ASSERT_TRUE(result == nullptr); in TEST_F()
463 result = gethostbyname2("hello", AF_INET6); in TEST_F()
464 ASSERT_TRUE(result == nullptr); in TEST_F()
478 const hostent* result = gethostbyname(kLocalHost); in TEST_F() local
480 ASSERT_FALSE(result == nullptr); in TEST_F()
481 ASSERT_EQ(4, result->h_length); in TEST_F()
482 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
483 EXPECT_EQ(kLocalHostAddr, ToString(result)); in TEST_F()
484 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
487 result = gethostbyname(name_camelcase); in TEST_F()
489 ASSERT_FALSE(result == nullptr); in TEST_F()
490 ASSERT_EQ(4, result->h_length); in TEST_F()
491 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
492 EXPECT_EQ(kLocalHostAddr, ToString(result)); in TEST_F()
493 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
502 result = gethostbyname(kIp6LocalHost); in TEST_F()
506 ASSERT_TRUE(result == nullptr); in TEST_F()
511 result = gethostbyname2(kIp6LocalHost, AF_INET6); in TEST_F()
513 ASSERT_FALSE(result == nullptr); in TEST_F()
514 ASSERT_EQ(16, result->h_length); in TEST_F()
515 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
516 EXPECT_EQ(kIp6LocalHostAddr, ToString(result)); in TEST_F()
517 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
528 const hostent* result = gethostbyname(numeric_v4); in TEST_F() local
530 ASSERT_FALSE(result == nullptr); in TEST_F()
531 ASSERT_EQ(4, result->h_length); // v4 in TEST_F()
532 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
533 EXPECT_EQ(numeric_v4, ToString(result)); in TEST_F()
534 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
539 result = gethostbyname(numeric_v6); in TEST_F()
541 EXPECT_TRUE(result == nullptr); in TEST_F()
545 result = gethostbyname2(numeric_v6, AF_INET6); in TEST_F()
547 ASSERT_FALSE(result == nullptr); in TEST_F()
548 ASSERT_EQ(16, result->h_length); // v6 in TEST_F()
549 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
550 EXPECT_EQ(numeric_v6, ToString(result)); in TEST_F()
551 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
560 result = gethostbyname2(numeric_v6_scope, AF_INET6); in TEST_F()
562 ASSERT_TRUE(result == nullptr); in TEST_F()
594 const hostent* result = gethostbyname(mapping.host.c_str()); in TEST_F() local
601 ASSERT_FALSE(result == nullptr); in TEST_F()
602 ASSERT_EQ(4, result->h_length); in TEST_F()
603 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
604 EXPECT_EQ(mapping.ip4, ToString(result)); in TEST_F()
605 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
652 ScopedAddrinfo result = safe_getaddrinfo("howdy", nullptr, nullptr); in TEST_F() local
653 EXPECT_TRUE(result != nullptr); in TEST_F()
657 std::string result_str = ToString(result); in TEST_F()
663 result = safe_getaddrinfo("howdy", nullptr, nullptr); in TEST_F()
664 EXPECT_TRUE(result != nullptr); in TEST_F()
668 result_str = ToString(result); in TEST_F()
676 result = safe_getaddrinfo("howdy", nullptr, nullptr); in TEST_F()
677 EXPECT_TRUE(result != nullptr); in TEST_F()
684 result_str = ToString(result); in TEST_F()
695 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
696 EXPECT_TRUE(result != nullptr); in TEST_F()
698 EXPECT_EQ("1.2.3.5", ToString(result)); in TEST_F()
707 ScopedAddrinfo result = safe_getaddrinfo(kLocalHost, nullptr, nullptr); in TEST_F() local
708 EXPECT_TRUE(result != nullptr); in TEST_F()
711 EXPECT_EQ(kLocalHostAddr, ToString(result)); in TEST_F()
713 result = safe_getaddrinfo(kIp6LocalHost, nullptr, nullptr); in TEST_F()
714 EXPECT_TRUE(result != nullptr); in TEST_F()
717 EXPECT_EQ(kIp6LocalHostAddr, ToString(result)); in TEST_F()
730 addrinfo* result = nullptr; in TEST_F() local
733 EXPECT_EQ(EAI_NODATA, getaddrinfo("hello", nullptr, &hints, &result)); in TEST_F()
734 ScopedAddrinfo result_cleanup(result); in TEST_F()
735 EXPECT_EQ(nullptr, result); in TEST_F()
777 ScopedAddrinfo result = safe_getaddrinfo(host_name_deferred, nullptr, &hints); in TEST_F() local
781 EXPECT_TRUE(result != nullptr); in TEST_F()
782 EXPECT_EQ("1.2.3.4", ToString(result)); in TEST_F()
790 ScopedAddrinfo result = safe_getaddrinfo(host_name_deferred, nullptr, &hints); in TEST_F() local
793 EXPECT_TRUE(result != nullptr); in TEST_F()
794 EXPECT_EQ("1.2.3.4", ToString(result)); in TEST_F()
813 ScopedAddrinfo result = safe_getaddrinfo(host_name_normal, nullptr, &hints); in TEST_F() local
817 EXPECT_TRUE(result != nullptr); in TEST_F()
818 EXPECT_EQ("1.2.3.5", ToString(result)); in TEST_F()
845 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
846 EXPECT_TRUE(result != nullptr); in TEST_F()
847 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
851 result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F()
852 EXPECT_TRUE(result != nullptr); in TEST_F()
853 EXPECT_EQ("2001:db8::42", ToString(result)); in TEST_F()
865 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
866 EXPECT_TRUE(result == nullptr); in TEST_F()
870 result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F()
871 EXPECT_TRUE(result == nullptr); in TEST_F()
883 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
884 EXPECT_TRUE(result == nullptr); in TEST_F()
888 result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F()
889 EXPECT_TRUE(result == nullptr); in TEST_F()
900 const hostent* result = gethostbyname("nihao"); in TEST_F() local
903 ASSERT_FALSE(result == nullptr); in TEST_F()
904 ASSERT_EQ(4, result->h_length); in TEST_F()
905 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in TEST_F()
906 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
907 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in TEST_F()
920 ScopedAddrinfo result = safe_getaddrinfo(numeric_addr, nullptr, &hints); in TEST_F() local
921 EXPECT_TRUE(result != nullptr); in TEST_F()
922 EXPECT_EQ(numeric_addr, ToString(result)); in TEST_F()
928 result = safe_getaddrinfo(host_name, nullptr, &hints); in TEST_F()
929 EXPECT_TRUE(result == nullptr); in TEST_F()
957 ScopedAddrinfo result = safe_getaddrinfo(domain.c_str(), nullptr, &hints); in TEST_F() local
963 ScopedAddrinfo result = safe_getaddrinfo("ohayou", nullptr, &hints); in TEST_F() local
964 EXPECT_TRUE(result != nullptr); in TEST_F()
1009 ScopedAddrinfo result = safe_getaddrinfo(host_name1, nullptr, &hints); in TEST_F() local
1010 EXPECT_TRUE(result != nullptr); in TEST_F()
1054 addrinfo* result = nullptr; in TEST_F() local
1055 int rv = getaddrinfo("konbanha", nullptr, &hints, &result); in TEST_F()
1057 if (result) { in TEST_F()
1058 freeaddrinfo(result); in TEST_F()
1059 result = nullptr; in TEST_F()
1199 ScopedAddrinfo result = safe_getaddrinfo(hostname, nullptr, &hints); in TEST_F() local
1200 ASSERT_TRUE(result == nullptr); in TEST_F()
1270 ScopedAddrinfo result = safe_getaddrinfo(config.name.c_str(), nullptr, &hints); in TEST_F() local
1272 ASSERT_TRUE(result == nullptr); in TEST_F()
1275 ASSERT_TRUE(result != nullptr); in TEST_F()
1276 EXPECT_THAT(ToStrings(result), testing::UnorderedElementsAreArray(config.queryResult)); in TEST_F()
1306 ScopedAddrinfo result = safe_getaddrinfo(hostnameV4V6, nullptr, &hints); in TEST_F() local
1307 ASSERT_TRUE(result != nullptr); in TEST_F()
1308 EXPECT_THAT(ToStrings(result), testing::UnorderedElementsAreArray({custAddrV4, custAddrV6})); in TEST_F()
1313 result = safe_getaddrinfo(hostnameV4V6, nullptr, &hints); in TEST_F()
1314 ASSERT_TRUE(result != nullptr); in TEST_F()
1315 EXPECT_THAT(ToStrings(result), testing::UnorderedElementsAreArray({dnsSvAddrV4, dnsSvAddrV6})); in TEST_F()
1363 ScopedAddrinfo result = safe_getaddrinfo("test13", nullptr, &hints); in TEST_F() local
1364 EXPECT_TRUE(result != nullptr); in TEST_F()
1367 EXPECT_EQ("2001:db8::13", ToString(result)); in TEST_F()
1374 result = safe_getaddrinfo("test13", nullptr, &hints); in TEST_F()
1375 EXPECT_TRUE(result != nullptr); in TEST_F()
1378 EXPECT_EQ("2001:db8::1:13", ToString(result)); in TEST_F()
1435 ScopedAddrinfo result = safe_getaddrinfo("test13", nullptr, &hints); in TEST_F() local
1437 EXPECT_TRUE(result != nullptr); in TEST_F()
1441 EXPECT_EQ("2001:db8::13", ToString(result)); in TEST_F()
1452 result = safe_getaddrinfo("test14", nullptr, &hints); in TEST_F()
1453 EXPECT_TRUE(result != nullptr); in TEST_F()
1458 EXPECT_EQ("2001:db8::1:13", ToString(result)); in TEST_F()
1554 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
1557 std::string result_str = ToString(result); in TEST_F()
1600 ScopedAddrinfo result = safe_getaddrinfo(hostname, nullptr, &hints); in TEST_F() local
1601 EXPECT_NE(result.get(), nullptr); in TEST_F()
1602 EXPECT_EQ(ToString(result), "1.2.3.4"); in TEST_F()
1639 const hostent* result; in TEST_F() local
1641 result = gethostbyname("tlsmissing"); in TEST_F()
1642 ASSERT_FALSE(result == nullptr); in TEST_F()
1643 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
1687 const hostent* result; in TEST_F() local
1688 result = gethostbyname("tlsbroken1"); in TEST_F()
1689 ASSERT_FALSE(result == nullptr); in TEST_F()
1690 EXPECT_EQ("1.2.3.1", ToString(result)); in TEST_F()
1699 result = gethostbyname("tlsbroken2"); in TEST_F()
1700 ASSERT_FALSE(result == nullptr); in TEST_F()
1701 EXPECT_EQ("1.2.3.2", ToString(result)); in TEST_F()
1730 const hostent* result = gethostbyname("tls1"); in TEST_F() local
1731 ASSERT_FALSE(result == nullptr); in TEST_F()
1732 EXPECT_EQ("1.2.3.1", ToString(result)); in TEST_F()
1742 result = gethostbyname("tls2"); in TEST_F()
1743 EXPECT_FALSE(result == nullptr); in TEST_F()
1744 EXPECT_EQ("1.2.3.2", ToString(result)); in TEST_F()
1754 result = gethostbyname("tls3"); in TEST_F()
1755 ASSERT_FALSE(result == nullptr); in TEST_F()
1756 EXPECT_EQ("1.2.3.3", ToString(result)); in TEST_F()
1791 const hostent* result = gethostbyname("tlsfailover1"); in TEST_F() local
1792 ASSERT_FALSE(result == nullptr); in TEST_F()
1793 EXPECT_EQ("1.2.3.1", ToString(result)); in TEST_F()
1803 result = gethostbyname("tlsfailover2"); in TEST_F()
1804 EXPECT_EQ("1.2.3.4", ToString(result)); in TEST_F()
1864 ScopedAddrinfo result = safe_getaddrinfo("addrinfotls", nullptr, nullptr); in TEST_F() local
1865 EXPECT_TRUE(result != nullptr); in TEST_F()
1869 std::string result_str = ToString(result); in TEST_F()
2939 ScopedAddrinfo result = safe_getaddrinfo("v4only", nullptr, &hints); in TEST_F() local
2940 EXPECT_TRUE(result != nullptr); in TEST_F()
2945 std::string result_str = ToString(result); in TEST_F()
2954 result = safe_getaddrinfo("v4only", nullptr, &hints); in TEST_F()
2955 EXPECT_TRUE(result != nullptr); in TEST_F()
2960 result_str = ToString(result); in TEST_F()
2987 ScopedAddrinfo result = safe_getaddrinfo("v4only", nullptr, &hints); in TEST_F() local
2988 EXPECT_TRUE(result != nullptr); in TEST_F()
2989 std::string result_str = ToString(result); in TEST_F()
2993 result = safe_getaddrinfo("v4only", nullptr, &hints); in TEST_F()
2994 EXPECT_TRUE(result != nullptr); in TEST_F()
2996 result_str = ToString(result); in TEST_F()
3020 ScopedAddrinfo result = safe_getaddrinfo("v4v6", nullptr, &hints); in TEST_F() local
3021 EXPECT_TRUE(result != nullptr); in TEST_F()
3025 const std::vector<std::string> result_strs = ToStrings(result); in TEST_F()
3051 ScopedAddrinfo result = safe_getaddrinfo("v4v6", nullptr, &hints); in TEST_F() local
3052 EXPECT_TRUE(result != nullptr); in TEST_F()
3056 std::string result_str = ToString(result); in TEST_F()
3110 ScopedAddrinfo result = safe_getaddrinfo(config.name.c_str(), nullptr, &hints); in TEST_F() local
3112 EXPECT_TRUE(result == nullptr); in TEST_F()
3118 result = safe_getaddrinfo(config.name.c_str(), nullptr, &hints); in TEST_F()
3119 EXPECT_TRUE(result != nullptr); in TEST_F()
3123 std::string result_str = ToString(result); in TEST_F()
3152 ScopedAddrinfo result = safe_getaddrinfo("v4only", nullptr, nullptr); in TEST_F() local
3153 EXPECT_TRUE(result != nullptr); in TEST_F()
3155 std::string result_str = ToString(result); in TEST_F()
3160 result = safe_getaddrinfo("v4v6", nullptr, nullptr); in TEST_F()
3161 EXPECT_TRUE(result != nullptr); in TEST_F()
3163 std::vector<std::string> result_strs = ToStrings(result); in TEST_F()
3221 ScopedAddrinfo result = safe_getaddrinfo(nullptr, PORT_NAME_HTTP, &hints); in TEST_F() local
3222 ASSERT_TRUE(result != nullptr); in TEST_F()
3225 std::vector<std::string> result_strs = ToStrings(result); in TEST_F()
3233 result = safe_getaddrinfo(nullptr, PORT_NUMBER_HTTP, &hints); in TEST_F()
3234 ASSERT_TRUE(result != nullptr); in TEST_F()
3237 result_strs = ToStrings(result); in TEST_F()
3246 struct hostent* result = nullptr; in TEST_F() local
3275 result = gethostbyaddr(&v4addr, sizeof(v4addr), AF_INET); in TEST_F()
3276 ASSERT_TRUE(result != nullptr); in TEST_F()
3277 std::string result_str = result->h_name ? result->h_name : "null"; in TEST_F()
3282 result = gethostbyaddr(&v6addr, sizeof(v6addr), AF_INET6); in TEST_F()
3283 ASSERT_TRUE(result != nullptr); in TEST_F()
3284 result_str = result->h_name ? result->h_name : "null"; in TEST_F()
3323 struct hostent* result = gethostbyaddr(&v6addr, sizeof(v6addr), AF_INET6); in TEST_F() local
3324 ASSERT_TRUE(result != nullptr); in TEST_F()
3327 std::string result_str = result->h_name ? result->h_name : "null"; in TEST_F()
3332 result_str = ToString(result); in TEST_F()
3340 result = gethostbyaddr(&v6addr, sizeof(v6addr), AF_INET6); in TEST_F()
3341 ASSERT_TRUE(result != nullptr); in TEST_F()
3343 result_str = result->h_name ? result->h_name : "null"; in TEST_F()
3368 struct hostent* result = gethostbyaddr(&v6addr, sizeof(v6addr), AF_INET6); in TEST_F() local
3369 ASSERT_TRUE(result != nullptr); in TEST_F()
3373 ASSERT_EQ(sizeof(in6_addr), (unsigned)result->h_length); in TEST_F()
3374 ASSERT_EQ(AF_INET6, result->h_addrtype); in TEST_F()
3375 std::string result_str = ToString(result); in TEST_F()
3377 result_str = result->h_name ? result->h_name : "null"; in TEST_F()
3407 hostent* result = gethostbyaddr(&v4addr, sizeof(v4addr), AF_INET); in TEST_F() local
3408 ASSERT_TRUE(result != nullptr); in TEST_F()
3409 EXPECT_STREQ("hello.example.com", result->h_name); in TEST_F()
3660 struct hostent* result = gethostbyname2("ipv4only", AF_INET6); in TEST_F() local
3661 ASSERT_TRUE(result != nullptr); in TEST_F()
3663 std::string result_str = ToString(result); in TEST_F()
3687 struct hostent* result = gethostbyname2("v4v6", AF_INET); in TEST_F() local
3688 ASSERT_TRUE(result != nullptr); in TEST_F()
3690 std::string result_str = ToString(result); in TEST_F()
3695 result = gethostbyname2("v4v6", AF_INET6); in TEST_F()
3696 ASSERT_TRUE(result != nullptr); in TEST_F()
3698 result_str = ToString(result); in TEST_F()
3751 struct hostent* result = gethostbyname2(config.name.c_str(), AF_INET6); in TEST_F() local
3756 EXPECT_EQ(nullptr, result); in TEST_F()
3827 ScopedAddrinfo result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F() local
3828 ASSERT_TRUE(result == nullptr); in TEST_F()
3832 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3833 ASSERT_FALSE(result == nullptr); in TEST_F()
3834 EXPECT_EQ("2001:db8:6464::102:304", ToString(result)); in TEST_F()
3838 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3839 ASSERT_FALSE(result == nullptr); in TEST_F()
3840 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3865 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3866 ASSERT_FALSE(result == nullptr); in TEST_F()
3867 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3871 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3872 EXPECT_TRUE(result == nullptr); in TEST_F()
3876 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3877 ASSERT_FALSE(result == nullptr); in TEST_F()
3878 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3881 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3882 ASSERT_TRUE(result == nullptr); in TEST_F()
3899 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3900 ASSERT_FALSE(result == nullptr); in TEST_F()
3901 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3905 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3906 ASSERT_TRUE(result == nullptr); in TEST_F()
3919 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3920 ASSERT_FALSE(result == nullptr); in TEST_F()
3921 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3936 result = safe_getaddrinfo("v4.example.com", nullptr, &hints); in TEST_F()
3937 ASSERT_FALSE(result == nullptr); in TEST_F()
3938 EXPECT_EQ("64:ff9b::102:304", ToString(result)); in TEST_F()
3985 int result; in readResponseCode() local
3986 EXPECT_TRUE(ParseInt(buf, &result)); in readResponseCode()
3987 return result; in readResponseCode()
4235 auto [result, timeTakenMs] = safe_getaddrinfo_time_taken(hostname1, nullptr, hints); in TEST_F()
4237 EXPECT_NE(nullptr, result); in TEST_F()
4240 EXPECT_EQ(records.at(0).addr, ToString(result)); in TEST_F()
4250 std::tie(result, timeTakenMs) = safe_getaddrinfo_time_taken(hostname2, nullptr, hints); in TEST_F()
4252 EXPECT_NE(nullptr, result); in TEST_F()
4255 EXPECT_EQ(records.at(1).addr, ToString(result)); in TEST_F()
4266 const hostent* result = gethostbyname("hello"); in TEST_F() local
4270 result = gethostbyname("hello"); in TEST_F()
4275 result = gethostbyname("hello"); in TEST_F()
4297 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
4298 EXPECT_TRUE(result != nullptr); in TEST_F()
4299 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in TEST_F()
4320 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
4322 EXPECT_TRUE(result != nullptr); in TEST_F()
4323 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in TEST_F()
4334 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
4336 EXPECT_TRUE(result != nullptr); in TEST_F()
4337 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in TEST_F()
4353 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
4355 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in TEST_F()
4434 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in TEST_F() local
4435 ASSERT_TRUE(result != nullptr); in TEST_F()
4436 EXPECT_EQ(ToString(result), kHelloExampleComAddrV4); in TEST_F()
4782 ScopedAddrinfo result = safe_getaddrinfo("hello", nullptr, &hints); in VerifyQueryHelloExampleComV4() local
4783 ASSERT_TRUE(result != nullptr); in VerifyQueryHelloExampleComV4()
4784 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in VerifyQueryHelloExampleComV4()
4786 const hostent* result = gethostbyname("hello"); in VerifyQueryHelloExampleComV4() local
4787 ASSERT_TRUE(result != nullptr); in VerifyQueryHelloExampleComV4()
4788 ASSERT_EQ(4, result->h_length); in VerifyQueryHelloExampleComV4()
4789 ASSERT_FALSE(result->h_addr_list[0] == nullptr); in VerifyQueryHelloExampleComV4()
4790 EXPECT_EQ(kHelloExampleComAddrV4, ToString(result)); in VerifyQueryHelloExampleComV4()
4791 EXPECT_TRUE(result->h_addr_list[1] == nullptr); in VerifyQueryHelloExampleComV4()
5058 ScopedAddrinfo result = safe_getaddrinfo(host_name, nullptr, &hints); in TEST_F() local
5059 EXPECT_TRUE(result != nullptr); in TEST_F()
5061 std::string result_str = ToString(result); in TEST_F()
5094 auto [result, timeTakenMs] = safe_getaddrinfo_time_taken(host_name, nullptr, hints); in TEST_F()
5096 EXPECT_TRUE(result == nullptr); in TEST_F()
5129 auto [result, timeTakenMs] = safe_getaddrinfo_time_taken(kHelloExampleCom, nullptr, hints); in TEST_F()
5131 EXPECT_NE(nullptr, result); in TEST_F()
5132 EXPECT_THAT(ToStrings(result), testing::UnorderedElementsAreArray( in TEST_F()
5140 std::tie(result, timeTakenMs) = safe_getaddrinfo_time_taken(kHelloExampleCom, nullptr, hints); in TEST_F()
5141 EXPECT_NE(nullptr, result); in TEST_F()
5142 EXPECT_THAT(ToStrings(result), testing::UnorderedElementsAreArray( in TEST_F()