Branch Coverage

lib/XML/Parser/Lite/Tree/XPath/Tree.pm
Criterion Covered Total %
branch 96 130 73.8


line true false branch
23 0 179 unless $self->make_groups
31 0 179 unless $self->recurse_before($self, 'clean_axis_and_abbreviations')
32 3 176 unless $self->recurse_before($self, 'claim_groups')
33 0 176 unless $self->recurse_after($self, 'build_steps')
34 0 176 unless $self->recurse_after($self, 'build_paths')
41 0 176 unless $self->binops(['|'], 'UnionExpr')
42 0 176 unless $self->recurse_before($self, 'unary_minus')
43 0 176 unless $self->binops(['*', 'div', 'mod'], 'MultiplicativeExpr')
44 0 176 unless $self->binops(['+', '-'], 'AdditiveExpr')
45 0 176 unless $self->binops(['<', '<=', '>', '>='], 'RelationalExpr')
46 0 176 unless $self->binops(['=', '!='], 'EqualityExpr')
47 0 176 unless $self->binops(['and'], 'AndExpr')
48 0 176 unless $self->binops(['or'], 'OrExpr')
122 112 1111 if ($token->match('Symbol', '(')) { }
50 1061 elsif ($token->match('Symbol', '[')) { }
112 949 elsif ($token->match('Symbol', ')')) { }
50 899 elsif ($token->match('Symbol', ']')) { }
144 0 112 if ($$parent{'type'} ne 'Group()')
153 0 50 if ($$parent{'type'} ne 'Predicate')
172 182 4118 unless $self->$method($root)
176 0 3587 unless $self->recurse_before($token, $method)
187 0 11049 unless $self->recurse_after($token, $method)
190 0 12633 unless $self->$method($root)
221 6 1356 if ($token->match('NodeType')) { }
106 1250 elsif ($token->match('FunctionName')) { }
0 1250 elsif ($token->match('Group()')) { }
227 0 6 unless ($next->match('Group()'))
234 4 2 if ($$token{'content'} eq 'processing-instruction') { }
236 1 3 if ($childs == 0) { }
2 1 elsif ($childs == 1) { }
242 1 1 if ($$next{'tokens'}[0]{'type'} eq 'Literal') { }
256 1 1 if ($childs > 0)
271 0 106 unless ($next->match('Group()'))
280 0 106 unless $self->claim_groups($next)
287 0 106 unless $self->make_arg_list($token, $next)
317 35 71 unless scalar @{$$arg_group{'tokens'};}
325 25 176 if ($token->match('Symbol', ',')) { }
356 39 983 if ($token->match('AxisName')) { }
15 968 elsif ($token->match('Symbol', '@')) { }
61 907 elsif ($token->match('Operator', '//')) { }
1 906 elsif ($token->match('Symbol', '.')) { }
1 905 elsif ($token->match('Symbol', '..')) { }
360 0 39 unless ($next->match('Symbol', '::'))
447 117 874 if ($token->match('AxisSpecifier')) { }
179 695 elsif ($token->match('NodeTypeTest') or $token->match('NameTest')) { }
0 695 elsif ($token->match('Predicate')) { }
451 0 117 unless (defined $next)
457 0 117 unless ($next->match('NodeTypeTest') or $next->match('NameTest'))
473 0 73 if ($token->match('Predicate')) { }
496 50 84 if ($token->match('Predicate')) { }
530 25 901 if ($token->match('Step')) { }
131 770 elsif ($token->match('Operator', '/')) { }
537 0 25 unless $self->slurp_path($path, $tokens)
550 0 131 unless $self->slurp_path($path, $tokens)
552 0 131 unless (scalar @{$$path{'tokens'};})
575 288 139 if (defined $t1) { }
576 271 17 if ($t1->match('Operator', '/')) { }
580 271 0 if (defined $t2) { }
581 271 0 if ($t2->match('Step')) { }
613 76 16819 if ($token->match('Operator', $op))
615 0 76 unless (scalar @{$$root{'tokens'};})
620 0 76 unless (scalar @{$tokens;})
650 365 865 if defined $prev
677 13 1209 if ($token->match('Operator', '-'))
679 5 8 if (defined $$token{'next'} and defined $$token{'prev'} and $$token{'prev'}->is_expression) { }