Branch Coverage

lib/HTML/Object/XPath/Step.pm
Criterion Covered Total %
branch 62 154 40.2


line true false branch
66 0 166 unless $self->SUPER::init(@_)
75 0 0 if ($test == 8) { }
0 0 elsif ($test == 6) { }
0 0 elsif ($test == 7) { }
0 0 elsif ($test == 9) { }
0 0 elsif ($test == 1 or $test == 4) { }
78 0 0 if ($self->{'literal'}->value)
107 0 0 unless defined $_
122 0 0 if ($test == 8) { }
0 0 elsif ($test == 6) { }
0 0 elsif ($test == 7) { }
0 0 elsif ($test == 9) { }
0 0 elsif ($test == 1 or $test == 4) { }
125 0 0 if ($self->{'literal'}->value) { }
160 0 0 unless defined $_
185 0 0 if ($self->node_test($parent))
209 0 0 if ($self->node_test($context))
225 193 246 if ($self->test_attribute($attrib))
236 0 481 if ($self->debug)
244 158 318 if ($self->node_test($node))
261 97 966 if ($self->node_test($node)) { }
282 497 0 if ($self->node_test($node))
299 9 21 if ($self->node_test($elt))
315 0 0 if ($self->node_test($context))
329 0 0 unless $context->isElementNode
332 0 0 if ($self->test_namespace($ns))
345 0 38 unless $parent
346 38 0 if ($self->node_test($parent))
360 6 12 if ($self->node_test($elt))
374 0 0 if ($self->node_test($context))
386 74 0 if ($self->node_test($context))
398 3 368 if ($from and not $from->isa("HTML::Object::XPath::NodeSet"))
422 0 878 if ($self->debug)
448 3 875 if ($@)
474 0 488 unless (ref $nodeset)
489 146 33 if ($result->isa('HTML::Object::XPath::Boolean')) { }
17 16 elsif ($result->isa('HTML::Object::XPath::Number')) { }
491 51 95 if ($result->value)
498 14 3 if ($result->value == $i)
506 10 6 if ($result->to_boolean->value)
528 571 1625 if $test == 9
530 216 1409 if ($test == 2)
532 146 70 if $node->isElementNode and defined $node->getName
536 0 1479 if ($test == 1) { }
1409 70 elsif ($test == 0) { }
0 70 elsif ($test == 7) { }
0 70 elsif ($test == 6) { }
0 70 elsif ($test == 8 and not $self->{'literal'}) { }
0 70 elsif ($test == 8) { }
538 0 0 unless $node->isElementNode
543 565 844 unless $node->isElementNode
544 0 844 if ($self->{'literal'} =~ /:/ or $self->{'pp'}{'strict_namespaces'}) { }
547 0 0 if $name eq $node->getLocalName and $self->_match_ns($node)
551 162 682 if $node->getName eq $self->{'literal'}
556 0 0 if $node->isTextNode
560 0 0 if $node->isCommentNode
564 0 0 if $node->isPINode
568 0 0 unless $node->isPINode
569 0 0 if (my $val = $self->{'literal'}->value) { }
571 0 0 if $node->getTarget eq $val
589 76 363 if $test == 5 or $test == 9
591 0 363 if ($test == 4) { }
363 0 elsif ($test == 3) { }
593 0 0 if $self->_match_ns($node)
597 0 363 if ($self->{'literal'} =~ /:/) { }
600 0 0 if $name eq $node->getLocalName and $self->_match_ns($node)
604 117 246 if $node->getName eq $self->{'literal'}
619 0 0 if $test == 2
621 0 0 if ($test == 2) { }
0 0 elsif ($self->{'literal'} eq $node->getExpanded) { }
636 0 1740 if $@
648 0 0 if ($pp->{'uses_namespaces'} or $pp->{'strict_namespaces'}) { }
651 0 0 if ($match_ns or $pp->{'strict_namespaces'}) { }
674 0 0 if ($name =~ /^(.*?):/) { }
687 0 0 $name =~ /:/ ? :
699 5 10 unless $elt and $elt->can("getNextSibling")
714 3 3 unless $elt->getParentNode