MCPcopy Create free account
hub / github.com/ElementsProject/elements / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

src/test/netbase_tests.cpp:45–53  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

43}
44
45BOOST_AUTO_TEST_CASE(netbase_networks)
46{
47 BOOST_CHECK(ResolveIP("127.0.0.1").GetNetwork() == NET_UNROUTABLE);
48 BOOST_CHECK(ResolveIP("::1").GetNetwork() == NET_UNROUTABLE);
49 BOOST_CHECK(ResolveIP("8.8.8.8").GetNetwork() == NET_IPV4);
50 BOOST_CHECK(ResolveIP("2001::8888").GetNetwork() == NET_IPV6);
51 BOOST_CHECK(ResolveIP("pg6mmjiyjmcrsslvykfwnntlaru7p5svn6y2ymmju6nubxndf4pscryd.onion").GetNetwork() == NET_ONION);
52 BOOST_CHECK(CreateInternal("foo.com").GetNetwork() == NET_INTERNAL);
53}
54
55BOOST_AUTO_TEST_CASE(netbase_properties)
56{

Callers

nothing calls this directly

Calls 15

CreateInternalFunction · 0.85
TestSplitHostFunction · 0.85
ResolveSubNetFunction · 0.85
ParseNetworkFunction · 0.85
LookupHostFunction · 0.85
LookupSubNetFunction · 0.85
ParseHexFunction · 0.85
IsBadPortFunction · 0.85
GetNetworkMethod · 0.80
IsIPv4Method · 0.80
IsIPv6Method · 0.80
IsRFC1918Method · 0.80

Tested by

no test coverage detected