MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

src/test/netbase_tests.cpp:40–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40BOOST_AUTO_TEST_CASE(netbase_networks)
41{
42 BOOST_CHECK(ResolveIP("127.0.0.1").GetNetwork() == NET_UNROUTABLE);
43 BOOST_CHECK(ResolveIP("::1").GetNetwork() == NET_UNROUTABLE);
44 BOOST_CHECK(ResolveIP("8.8.8.8").GetNetwork() == NET_IPV4);
45 BOOST_CHECK(ResolveIP("2001::8888").GetNetwork() == NET_IPV6);
46 BOOST_CHECK(ResolveIP("pg6mmjiyjmcrsslvykfwnntlaru7p5svn6y2ymmju6nubxndf4pscryd.onion").GetNetwork() == NET_ONION);
47 BOOST_CHECK(CreateInternal("foo.com").GetNetwork() == NET_INTERNAL);
48}
49
50BOOST_AUTO_TEST_CASE(netbase_properties)
51{

Callers

nothing calls this directly

Calls 15

CreateInternalFunction · 0.85
TestSplitHostFunction · 0.85
LookupSubNetFunction · 0.85
ParseNetworkFunction · 0.85
LookupHostFunction · 0.85
ParseHexFunction · 0.85
IsBadPortFunction · 0.85
GetNetworkMethod · 0.80
IsRFC1918Method · 0.80
IsRFC2544Method · 0.80
IsRFC3849Method · 0.80
IsRFC3927Method · 0.80

Tested by

no test coverage detected