Condition Coverage

blib/lib/Zonemaster/Engine/Test/Nameserver.pm
Criterion Covered Total %
condition 45 135 33.3


and 2 conditions

line l !l condition
555 2 2 scalar @all_nsnames_without_ip and scalar @all_nsnames_with_ip
717 0 0 $p1 and scalar $p1->answer
722 0 0 $p2 and scalar $p2->answer

and 3 conditions

line !l l&&!r l&&r condition
193 172 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
195 172 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
202 0 74 0 $p->rcode eq 'NXDOMAIN' and not $p->aa
74 0 0 $p->is_redirect and not $p->aa
74 0 0 not $p->is_redirect || $p->aa || $p->answer and $p->rcode eq 'NOERROR'
232 0 4 3 $ips_string and $ips_string eq $is_not_recursor_string
250 264 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
252 264 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
261 58 112 0 $p->rcode eq 'NXDOMAIN' and not $p->aa
112 0 58 $p->is_redirect and not $p->aa
112 0 0 not $p->is_redirect || $p->aa || $p->answer and $p->rcode eq 'NOERROR'
290 0 14 2 $ips_string and $ips_string eq $is_not_recursor_string
325 20 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
327 20 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
358 0 1 2 scalar keys %nsnames_and_ip and not scalar @results
379 32 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
381 32 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
399 16 0 0 $first_rr and $first_rr->type eq 'SOA'
424 36 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
426 36 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
432 0 18 0 $p->answerfrom and $local_ns->address->short ne 'Zonemaster::Engine::Net::IP'->new($p->answerfrom)->short
446 0 0 3 scalar keys %nsnames_and_ip and not scalar @results
470 18 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
482 18 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
509 18 0 0 not scalar $p->answer and $p->rcode eq 'NOERROR'
529 0 0 3 scalar keys %nsnames_and_ip and &none(sub { $_->tag eq 'ANSWER_BAD_RCODE'; } , @results)
591 12 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
593 12 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
615 0 0 1 scalar keys %nsnames_and_ip and not scalar @results
644 1 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
646 1 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
652 0 0 0 $p and my($qrr) = $p->question
705 0 0 0 not 'Zonemaster::Engine'->config->ipv6_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_6
707 0 0 0 not 'Zonemaster::Engine'->config->ipv4_ok and $local_ns->address->version == $Zonemaster::Engine::Test::Nameserver::IP_VERSION_4
717 0 0 0 $p1 and $p2

or 3 conditions

line l !l&&r !l&&!r condition
202 74 0 0 $p->is_redirect || $p->aa || $p->answer
261 112 0 0 $p->is_redirect || $p->aa || $p->answer
305 0 2 2 grep {$_->tag eq 'IS_A_RECURSOR';} @results or grep {$_->tag eq 'NO_RECURSOR';} @results
511 0 0 18 $p->rcode eq 'FORMERR' or $p->rcode eq 'SERVFAIL'
0 0 18 $p->rcode eq 'FORMERR' or $p->rcode eq 'SERVFAIL' or $p->rcode eq 'NXDOMAIN'
0 0 18 $p->rcode eq 'FORMERR' or $p->rcode eq 'SERVFAIL' or $p->rcode eq 'NXDOMAIN' or $p->rcode eq 'NOTIMPL'
698 0 0 0 $randomized_uc_name2 eq $original_name or $randomized_uc_name2 eq $randomized_uc_name1
717 0 0 0 $p1 or $p2