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

Unified Diff: webrtc/base/ipaddress_unittest.cc

Issue 1274013002: Bug 4865: Enable connectivity when the remote peer is on public internet. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc@master
Patch Set: Created 5 years, 4 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
« no previous file with comments | « webrtc/base/ipaddress.cc ('k') | webrtc/p2p/client/portallocator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/base/ipaddress_unittest.cc
diff --git a/webrtc/base/ipaddress_unittest.cc b/webrtc/base/ipaddress_unittest.cc
index 3a8087a5d44e79147b683ddca76d4d7e00bb8f36..d5cb6f709c6b93f47309c1aba18285bd1269745d 100644
--- a/webrtc/base/ipaddress_unittest.cc
+++ b/webrtc/base/ipaddress_unittest.cc
@@ -544,6 +544,19 @@ TEST(IPAddressTest, TestIsPrivate) {
EXPECT_TRUE(IPIsPrivate(IPAddress(kIPv6LinkLocalAddr)));
}
+TEST(IPAddressTest, TestIsNil) {
+ IPAddress addr;
+ EXPECT_TRUE(IPAddress().IsNil());
+
+ EXPECT_TRUE(IPFromString(kIPv6AnyAddrString, &addr));
+ EXPECT_FALSE(addr.IsNil());
+
+ EXPECT_TRUE(IPFromString(kIPv4AnyAddrString, &addr));
+ EXPECT_FALSE(addr.IsNil());
+
+ EXPECT_FALSE(IPAddress(kIPv4PublicAddr).IsNil());
+}
+
TEST(IPAddressTest, TestIsLoopback) {
EXPECT_FALSE(IPIsLoopback(IPAddress(INADDR_ANY)));
EXPECT_FALSE(IPIsLoopback(IPAddress(kIPv4PublicAddr)));
« no previous file with comments | « webrtc/base/ipaddress.cc ('k') | webrtc/p2p/client/portallocator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698