#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/base/ip_address.h"
#include <optional>
#include <vector>
#include "base/format_macros.h"
#include "base/strings/string_number_conversions.h"
#include "base/strings/stringprintf.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
Optional;
namespace net {
namespace {
std::string DumpIPAddress(const IPAddress& v) { … }
TEST(IPAddressBytesTest, ConstructEmpty) { … }
TEST(IPAddressBytesTest, ConstructIPv4) { … }
TEST(IPAddressBytesTest, ConstructIPv6) { … }
TEST(IPAddressBytesTest, Assign) { … }
TEST(IPAddressTest, ConstructIPv4) { … }
TEST(IPAddressTest, IsIPVersion) { … }
TEST(IPAddressTest, IsValid) { … }
enum IPAddressReservedResult : bool { … };
TEST(IPAddressTest, IsPubliclyRoutableIPv4) { … }
TEST(IPAddressTest, IsPubliclyRoutableIPv6) { … }
TEST(IPAddressTest, IsZero) { … }
TEST(IPAddressTest, IsIPv4Mapped) { … }
TEST(IPAddressTest, AllZeros) { … }
TEST(IPAddressTest, ToString) { … }
TEST(IPAddressTest, IPAddressToStringWithPort) { … }
TEST(IPAddressTest, IPAddressToPackedString) { … }
TEST(IPAddressTest, AssignFromIPLiteral_FailParse) { … }
TEST(IPAddressTest, AssignFromIPLiteral_ResetOnFailure) { … }
TEST(IPAddressTest, AssignFromIPLiteral_IPv4) { … }
TEST(IPAddressTest, AssignFromIPLiteral_IPv6) { … }
TEST(IPAddressTest, IsIPv4MappedIPv6) { … }
TEST(IPAddressTest, IsEqual) { … }
TEST(IPAddressTest, LessThan) { … }
TEST(IPAddressTest, ConvertIPv4ToIPv4MappedIPv6) { … }
TEST(IPAddressTest, ConvertIPv4MappedIPv6ToIPv4) { … }
TEST(IPAddressTest, IPAddressMatchesPrefix) { … }
TEST(IPAddressTest, ParseCIDRBlock_Invalid) { … }
TEST(IPAddressTest, ParseCIDRBlock_Valid) { … }
TEST(IPAddressTest, ParseURLHostnameToAddress_FailParse) { … }
TEST(IPAddressTest, ParseURLHostnameToAddress_IPv4) { … }
TEST(IPAddressTest, ParseURLHostnameToAddress_IPv6) { … }
TEST(IPAddressTest, IPAddressStartsWith) { … }
TEST(IPAddressTest, IsLinkLocal) { … }
TEST(IPAddressTest, IsUniqueLocalIPv6) { … }
TEST(IPAddressTest, ExtractPref64FromIpv4onlyArpaAAAA) { … }
TEST(IPAddressTest, ConvertIPv4ToIPv4EmbeddedIPv6) { … }
TEST(IPAddressTest, RoundtripAddressThroughValue) { … }
TEST(IPAddressTest, FromGarbageValue) { … }
TEST(IPAddressTest, FromInvalidValue) { … }
TEST(IPAddressTest, IPv4Mask) { … }
TEST(IPAddressTest, IPv6Mask) { … }
}
}