Branch Coverage

blib/lib/Org/Element.pm
Criterion Covered Total %
branch 35 50 70.0


line true false branch
25 209 49 unless $self->children
32 2 18 if (defined $self->_str) { }
33 0 2 $self->_str_include_children ? :
43 0 44 unless $self->parent and $c = $self->parent->children
46 44 31 if &refaddr($c->[$i]) == $addr
55 9 12 unless defined $sen and $sen > 0
64 0 7 unless defined $sen
66 2 5 unless $sen < @$c - 1
76 376 675 if ($self->children)
90 0 7 unless $self->children
95 12 46 if (ref $criteria eq 'CODE') { }
46 0 elsif ($criteria =~ /^\w+$/l) { }
96 2 10 if &$criteria($el)
98 15 31 if $el->isa("Org::Element::$criteria")
100 0 0 if $el->isa($criteria)
110 3 14 unless &$code($self, $parent)
122 2 0 if ($p->isa("Org::Element::Headline"))
137 3 1 if ($p->isa("Org::Element::Headline"))
150 0 0 if ($criteria)
151 0 0 if (ref $criteria eq 'CODE') { }
164 5 0 if ($prev and $prev->isa("Org::Element::Text"))
166 3 2 if ($text =~ /(?:\A|\R)\s*(.+?)\s*:\s*\z/l)
171 1 1 if ($parent and $parent->isa("Org::Element::ListItem"))
173 1 0 if ($list->type eq "D")
187 0 1 unless $parent