| Index: net/base/ip_address_number_unittest.cc
|
| diff --git a/net/base/ip_address_number_unittest.cc b/net/base/ip_address_number_unittest.cc
|
| index f7975d6d9bd9fa8304b43ee442d0f3ad8f42c010..d06f9443d1063f196c5df378cbecef11e4701616 100644
|
| --- a/net/base/ip_address_number_unittest.cc
|
| +++ b/net/base/ip_address_number_unittest.cc
|
| @@ -4,9 +4,7 @@
|
|
|
| #include "net/base/ip_address_number.h"
|
|
|
| -#include "base/format_macros.h"
|
| #include "base/strings/string_number_conversions.h"
|
| -#include "base/strings/stringprintf.h"
|
| #include "testing/gtest/include/gtest/gtest.h"
|
|
|
| namespace net {
|
| @@ -121,48 +119,6 @@ TEST(IpAddressNumberTest, ConvertIPv4MappedToIPv4) {
|
| EXPECT_EQ(expected, result);
|
| }
|
|
|
| -TEST(IpAddressNumberTest, IPNumberMatchesPrefix) {
|
| - struct {
|
| - const char* const cidr_literal;
|
| - size_t prefix_length_in_bits;
|
| - const char* const ip_literal;
|
| - bool expected_to_match;
|
| - } tests[] = {
|
| - // IPv4 prefix with IPv4 inputs.
|
| - {"10.10.1.32", 27, "10.10.1.44", true},
|
| - {"10.10.1.32", 27, "10.10.1.90", false},
|
| - {"10.10.1.32", 27, "10.10.1.90", false},
|
| -
|
| - // IPv6 prefix with IPv6 inputs.
|
| - {"2001:db8::", 32, "2001:DB8:3:4::5", true},
|
| - {"2001:db8::", 32, "2001:c8::", false},
|
| -
|
| - // IPv6 prefix with IPv4 inputs.
|
| - {"2001:db8::", 33, "192.168.0.1", false},
|
| - {"::ffff:192.168.0.1", 112, "192.168.33.77", true},
|
| -
|
| - // IPv4 prefix with IPv6 inputs.
|
| - {"10.11.33.44", 16, "::ffff:0a0b:89", true},
|
| - {"10.11.33.44", 16, "::ffff:10.12.33.44", false},
|
| - };
|
| - for (size_t i = 0; i < arraysize(tests); ++i) {
|
| - SCOPED_TRACE(base::StringPrintf("Test[%" PRIuS "]: %s, %s", i,
|
| - tests[i].cidr_literal,
|
| - tests[i].ip_literal));
|
| -
|
| - IPAddressNumber ip_number;
|
| - EXPECT_TRUE(ParseIPLiteralToNumber(tests[i].ip_literal, &ip_number));
|
| -
|
| - IPAddressNumber ip_prefix;
|
| -
|
| - EXPECT_TRUE(ParseIPLiteralToNumber(tests[i].cidr_literal, &ip_prefix));
|
| -
|
| - EXPECT_EQ(tests[i].expected_to_match,
|
| - IPNumberMatchesPrefix(ip_number, ip_prefix,
|
| - tests[i].prefix_length_in_bits));
|
| - }
|
| -}
|
| -
|
| } // anonymous namespace
|
|
|
| } // namespace net
|
|
|