Branch Coverage

blib/lib/Tree/XPathEngine/Expr.pm
Criterion Covered Total %
branch 105 148 70.9


line true false branch
16 0 0 if defined $$self{'op'}
17 0 0 if defined $$self{'rhs'}
45 0 0 if @{$$self{'predicates'};}
65 730 1669 if ($$self{'op'}) { }
66 0 730 unless $$self{'rhs'}
73 0 2393 if (my(@predicates) = @{$$self{'predicates'};})
74 0 0 unless ($results->isa('Tree::XPathEngine::NodeSet'))
94 5 725 if (/^or$/)
97 10 715 if (/^and$/)
100 104 611 if (/^=~$/)
103 5 606 if (/^!~$/)
106 427 179 if (/^=$/)
109 18 161 if (/^!=$/)
112 8 153 if (/^<=$/)
115 13 140 if (/^>=$/)
118 48 92 if (/^>$/)
121 19 73 if (/^<$/)
124 25 48 if (/^\+$/)
127 23 25 if (/^-$/)
130 6 19 if (/^div$/)
133 6 13 if (/^mod$/)
136 11 2 if (/^\*$/)
139 2 0 if (/^\|$/)
153 1 4 if ($lhs->evaluate($node)->xpath_to_boolean->value) { }
163 8 2 if (not $lhs->evaluate($node)->xpath_to_boolean->value) { }
177 10 434 if ($lh_results->isa('Tree::XPathEngine::NodeSet') and $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
364 70 elsif ($lh_results->isa('Tree::XPathEngine::NodeSet') || $rh_results->isa('Tree::XPathEngine::NodeSet') and not $lh_results->isa('Tree::XPathEngine::NodeSet') && $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
185 10 20 if ($lhnode->xpath_string_value eq $rhnode->xpath_string_value)
199 364 0 if ($lh_results->isa('Tree::XPathEngine::NodeSet')) { }
212 22 342 if ($other->isa('Tree::XPathEngine::Number')) { }
342 0 elsif ($other->isa('Tree::XPathEngine::Literal')) { }
0 0 elsif ($other->isa('Tree::XPathEngine::Boolean')) { }
215 8 27 if ($node->xpath_string_value == $other->value)
222 72 402 if ($node->xpath_string_value eq $other->value)
228 0 0 if ($nodeset->xpath_to_boolean->value == $other->value)
236 6 64 if ($lh_results->isa('Tree::XPathEngine::Boolean') or $rh_results->isa('Tree::XPathEngine::Boolean')) { }
42 22 elsif ($lh_results->isa('Tree::XPathEngine::Number') or $rh_results->isa('Tree::XPathEngine::Number')) { }
239 6 0 if ($lh_results->xpath_to_boolean->value == $rh_results->xpath_to_boolean->value)
248 29 13 if ($lh_results->xpath_to_number->value == $rh_results->xpath_to_number->value)
254 2 20 if ($lh_results->xpath_to_literal->value eq $rh_results->xpath_to_literal->value)
269 24 80 if ($lh_results->isa('Tree::XPathEngine::NodeSet')) { }
271 13 11 if ($lhnode->xpath_string_value =~ /$rh_value/)
277 6 74 $lh_results->xpath_string_value =~ /$rh_value/ ? :
289 5 0 if ($lh_results->isa('Tree::XPathEngine::NodeSet')) { }
291 5 5 unless ($lhnode->xpath_string_value =~ /$rh_value/)
297 0 0 !($lh_results->xpath_string_value =~ /$rh_value/) ? :
304 13 5 if (_op_equals($node, $lhs, $rhs)->value)
321 5 16 if ($lh_results->isa('Tree::XPathEngine::NodeSet') and $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
12 4 elsif ($lh_results->isa('Tree::XPathEngine::NodeSet') || $rh_results->isa('Tree::XPathEngine::NodeSet') and not $lh_results->isa('Tree::XPathEngine::NodeSet') && $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
329 5 0 if ($lhNum->value >= $rhNum->value)
342 6 6 if ($lh_results->isa('Tree::XPathEngine::NodeSet')) { }
345 4 2 if ($node->xpath_to_number->value >= $rh_results->xpath_to_number->value)
353 3 3 if ($lh_results->xpath_to_number->value >= $node->xpath_to_number->value)
361 4 0 if ($lh_results->isa('Tree::XPathEngine::Boolean') or $rh_results->isa('Tree::XPathEngine::Boolean')) { }
364 2 2 if ($lh_results->xpath_to_boolean->xpath_to_number->value >= $rh_results->xpath_to_boolean->xpath_to_number->value)
370 0 0 if ($lh_results->xpath_to_number->value >= $rh_results->xpath_to_number->value)
384 0 67 if ($lh_results->isa('Tree::XPathEngine::NodeSet') and $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
33 34 elsif ($lh_results->isa('Tree::XPathEngine::NodeSet') || $rh_results->isa('Tree::XPathEngine::NodeSet') and not $lh_results->isa('Tree::XPathEngine::NodeSet') && $rh_results->isa('Tree::XPathEngine::NodeSet')) { }
392 0 0 if ($lhNum->value > $rhNum->value)
405 22 11 if ($lh_results->isa('Tree::XPathEngine::NodeSet')) { }
408 12 10 if ($node->xpath_to_number->value > $rh_results->xpath_to_number->value)
416 7 9 if ($lh_results->xpath_to_number->value > $node->xpath_to_number->value)
424 4 30 if ($lh_results->isa('Tree::XPathEngine::Boolean') or $rh_results->isa('Tree::XPathEngine::Boolean')) { }
427 2 2 if ($lh_results->xpath_to_boolean->value > $rh_results->xpath_to_boolean->value)
432 13 17 if ($lh_results->xpath_to_number->value > $rh_results->xpath_to_number->value)
485 0 6 if ($@)
527 2 0 if ($lh_result->isa('Tree::XPathEngine::NodeSet') and $rh_result->isa('Tree::XPathEngine::NodeSet'))
536 2 0 unless exists $found{"$rhnode"}
555 0 0 unless (ref $nodeset)
568 0 0 if ($result->isa('Tree::XPathEngine::Boolean')) { }
0 0 elsif ($result->isa('Tree::XPathEngine::Number')) { }
569 0 0 if ($result->value)
574 0 0 if ($result->value == $i)
579 0 0 if ($result->xpath_to_boolean->value)