Branch Coverage

lib/HTML/Object/XPath/Expr.pm
Criterion Covered Total %
branch 39 126 30.9


line true false branch
40 0 255 unless $self->SUPER::init(@_)
50 0 0 if defined $self->{'op'}
51 0 0 if defined $self->{'rhs'}
66 0 0 if (defined $self->{'op'}) { }
94 162 511 if ($self->{'op'}) { }
96 0 162 unless $self->{'rhs'}
105 2 665 unless ($self->predicates->is_empty)
107 0 2 unless ($self->_is_a($results, "HTML::Object::XPath::NodeSet"))
134 0 2 unless (ref $nodeset)
149 0 18 if ($self->_is_a($result, 'HTML::Object::XPath::Boolean')) { }
18 0 elsif ($self->_is_a($result, 'HTML::Object::XPath::Number')) { }
151 0 0 if ($result->value)
158 2 16 if ($result->value == $i)
165 0 0 if ($result->to_boolean->value)
190 0 10 if (not $lhs->evaluate($node)->to_boolean->value) { }
208 0 0 if ($@)
226 0 96 if ($lh_results->isa('HTML::Object::XPath::NodeSet') and $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
89 7 elsif ($lh_results->isa('HTML::Object::XPath::NodeSet') || $rh_results->isa('HTML::Object::XPath::NodeSet') and not $lh_results->isa('HTML::Object::XPath::NodeSet') && $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
237 0 0 if ($lhnode->string_value eq $rhnode->string_value)
252 89 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet')) { }
267 5 84 if ($self->_is_a($other, 'HTML::Object::XPath::Number')) { }
84 0 elsif ($self->_is_a($other, 'HTML::Object::XPath::Literal')) { }
0 0 elsif ($self->_is_a($other, 'HTML::Object::XPath::Boolean')) { }
271 3 2 if ($node->string_value == $other->value)
281 35 24 if ($node->string_value eq $other->value)
289 0 0 if ($nodeset->to_boolean->value == $other->value)
299 0 7 if ($lh_results->isa('HTML::Object::XPath::Boolean') or $rh_results->isa('HTML::Object::XPath::Boolean')) { }
7 0 elsif ($lh_results->isa('HTML::Object::XPath::Number') or $rh_results->isa('HTML::Object::XPath::Number')) { }
303 0 0 if ($lh_results->to_boolean->value == $rh_results->to_boolean->value)
315 3 4 if ($lh_results->to_number->value == $rh_results->to_number->value)
323 0 0 if ($lh_results->to_literal->value eq $rh_results->to_literal->value)
356 0 162 unless exists $map->{$op}
369 0 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet') and $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
0 0 elsif ($lh_results->isa('HTML::Object::XPath::NodeSet') || $rh_results->isa('HTML::Object::XPath::NodeSet') and not $lh_results->isa('HTML::Object::XPath::NodeSet') && $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
378 0 0 if ($lhNum->value >= $rhNum->value)
392 0 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet')) { }
396 0 0 if ($node->to_number->value >= $rh_results->to_number->value)
406 0 0 if ($lh_results->to_number->value >= $node->to_number->value)
417 0 0 if ($lh_results->isa('HTML::Object::XPath::Boolean') or $rh_results->isa('HTML::Object::XPath::Boolean')) { }
421 0 0 if ($lh_results->to_boolean->to_number->value >= $rh_results->to_boolean->to_number->value)
428 0 0 if ($lh_results->to_number->value >= $rh_results->to_number->value)
445 0 1 if ($lh_results->isa('HTML::Object::XPath::NodeSet') and $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
0 1 elsif ($lh_results->isa('HTML::Object::XPath::NodeSet') || $rh_results->isa('HTML::Object::XPath::NodeSet') and not $lh_results->isa('HTML::Object::XPath::NodeSet') && $rh_results->isa('HTML::Object::XPath::NodeSet')) { }
454 0 0 if ($lhNum->value > $rhNum->value)
468 0 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet')) { }
472 0 0 if ($node->to_number->value > $rh_results->to_number->value)
482 0 0 if ($lh_results->to_number->value > $node->to_number->value)
493 0 1 if ($lh_results->isa('HTML::Object::XPath::Boolean') or $rh_results->isa('HTML::Object::XPath::Boolean')) { }
497 0 0 if ($lh_results->to_boolean->value > $rh_results->to_boolean->value)
504 0 1 if ($lh_results->to_number->value > $rh_results->to_number->value)
536 47 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet')) { }
541 12 9 if ($lhnode->string_value =~ /$rh_value/)
551 0 0 $lh_results->string_value =~ /$rh_value/ ? :
595 0 0 if ($self->op_equals($node, $lhs, $rhs)->value)
611 0 0 if ($lh_results->isa('HTML::Object::XPath::NodeSet')) { }
615 0 0 unless ($lhnode->string_value =~ /$rh_value/)
624 0 0 !($lh_results->string_value =~ /$rh_value/) ? :
632 5 0 if ($lhs->evaluate($node)->to_boolean->value) { }
660 0 0 if ($lh_result->isa("HTML::Object::XPath::NodeSet") and $rh_result->isa("HTML::Object::XPath::NodeSet"))
672 0 0 unless exists $found{"$rhnode"}
701 0 0 unless exists $map->{$op}
712 0 2 if @{$self->{'predicates'};}
742 0 2 if $@