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

Unified Diff: net/base/net_util_unittest.cc

Issue 23726043: Added NetworkInterface::network_prefix (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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: net/base/net_util_unittest.cc
diff --git a/net/base/net_util_unittest.cc b/net/base/net_util_unittest.cc
index 207e05a1cc077909f78c1a703d434d3b1f23bff9..bb1793ecf9f8def631c8b10dc2e8c1ffe643da8a 100644
--- a/net/base/net_util_unittest.cc
+++ b/net/base/net_util_unittest.cc
@@ -3291,7 +3291,7 @@ TEST(NetUtilTest, IsLocalhost) {
TEST(NetUtilTest, GetNetworkList) {
NetworkInterfaceList list;
ASSERT_TRUE(GetNetworkList(&list));
-
+ ASSERT_GT(list.size(), 1u);
for (NetworkInterfaceList::iterator it = list.begin();
it != list.end(); ++it) {
// Verify that the name is not empty.
@@ -3309,6 +3309,9 @@ TEST(NetUtilTest, GetNetworkList) {
}
}
EXPECT_FALSE(all_zeroes);
+ EXPECT_GE(it->network_prefix, 1u);
+ EXPECT_TRUE(it->address.size() != kIPv4AddressSize ||
+ it->network_prefix <= 32u);
szym 2013/09/23 19:58:42 Let's make it: EXPECT_LE(it->network_prefix, it->a
Vitaly Buka (NO REVIEWS) 2013/09/23 20:06:11 Done.
}
}

Powered by Google App Engine
This is Rietveld 408576698