Branch Coverage

SockAddr.xs
Criterion Covered Total %
branch 66 126 52.3


line true false branch
18 5 0 Stash me(__PACKAGE__);
19 5 0 Stash("Net::SockAddr::Inet4", GV_ADD).inherit(me);
5 0 Stash("Net::SockAddr::Inet4", GV_ADD).inherit(me);
20 5 0 Stash("Net::SockAddr::Inet6", GV_ADD).inherit(me);
5 0 Stash("Net::SockAddr::Inet6", GV_ADD).inherit(me);
21 5 0 Stash("Net::SockAddr::Unix", GV_ADD).inherit(me);
5 0 Stash("Net::SockAddr::Unix", GV_ADD).inherit(me);
23 5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
5 0 create_constants(me, {
70 5 create_constants(me, {
0 0 create_constants(me, {
35 5 0 {"IN6ADDR_ANY", Simple(addr2sv(SockAddr::Inet6::addr_any)) },
36 5 0 {"IN6ADDR_LOOPBACK", Simple(addr2sv(SockAddr::Inet6::addr_loopback)) },
37 5 0 {"SOCKADDR_ANY", xs::out(SockAddr::Inet4::sockaddr_any) },
38 5 0 {"SOCKADDR_LOOPBACK", xs::out(SockAddr::Inet4::sockaddr_loopback) },
39 5 0 {"SOCKADDR6_ANY", xs::out(SockAddr::Inet6::sockaddr_any) },
40 5 0 {"SOCKADDR6_LOOPBACK", xs::out(SockAddr::Inet6::sockaddr_loopback) }
5 0 {"SOCKADDR6_LOOPBACK", xs::out(SockAddr::Inet6::sockaddr_loopback) }
47 5 0 }
48 5 0
62 0 4 if (THIS->family() == AF_UNSPEC) XSRETURN_UNDEF;
63 4 0 RETVAL = string_view((const char*)THIS->get(), THIS->length());
67 3 0 std::ostringstream os;
68 3 0 os << *THIS;
69 3 0 RETVAL = os.str();
3 0 RETVAL = os.str();
72 7 0 bool SockAddr::_eq (SockAddr oth, ...) { RETVAL = *THIS == oth; }
74 3 0 bool SockAddr::_ne (SockAddr oth, ...) { RETVAL = *THIS != oth; }
81 0 3 RETVAL = SockAddr::Inet4(*(const in_addr*)addr.data(), port);
82 3 0 }
3 0 }
86 9 1 }
9 0 }
89 4 0 RETVAL = THIS->as_inet4().ip();
4 0 RETVAL = THIS->as_inet4().ip();
106 0 3 RETVAL = SockAddr::Inet6(*(const in6_addr*)addr.data(), port, scope_id, flow_info);
107 3 0 }
3 0 }
111 4 1 }
4 0 }
114 3 0 RETVAL = THIS->as_inet6().ip();
3 0 RETVAL = THIS->as_inet6().ip();
141 2 1 }
2 0 }