Branch Coverage

blib/lib/Org/Element/Headline.pm
Criterion Covered Total %
branch 70 98 71.4


line true false branch
36 23 1 if defined $self->_str
45 0 1 $self->is_todo ? :
0 1 $self->priority ? :
0 1 $self->statistics_cookie ? :
0 1 $self->tags && @{$self->tags;} ? :
60 6 1 unless $parent->isa("Org::Element::Headline")
61 1 0 if ($parent->tags)
63 1 0 unless grep {$_ eq $tag;} @res
69 6 0 unless grep {$_ eq $tag;} @res
82 5 19 if $ats
83 3 16 if $el->isa("Org::Element::Timestamp") and $el->is_active
87 3 5 if $ats
95 2 2 unless $self->children
101 0 2 if defined $res
103 2 0 if ($el->isa("Org::Element::Headline"))
118 0 8 if $num_levels == 0
119 0 8 if $num_levels < 0
124 1 8 if $l <= 1
139 2 3 unless $s and $s->isa("Org::Element::Headline") and $s->level > $l
141 1 2 unless defined $self->children
148 2 6 if ($parent->isa("Org::Element::Headline") and $parent->level == $l)
161 0 6 if $num_levels == 0
162 0 6 if $num_levels < 0
174 1 1 if ($ps and $ps->isa("Org::Element::Headline") and $ps->level < $l)
176 1 0 unless defined $ps->children
187 0 1 if $num_levels == 0
188 0 1 if $num_levels < 0
191 0 1 if $self->level <= 1
199 0 1 if $num_levels == 0
200 0 1 if $num_levels < 0
211 0 13 unless $self->children
213 1 13 unless $d->isa("Org::Element::Drawer") and $d->name eq $wanted_drawer_name and $d->properties
227 5 7 if $propd and defined $propd->properties->{$name}
229 2 5 if ($parent and $search_parent)
231 3 0 if ($parent->isa("Org::Element::Headline"))
233 2 1 if defined $res
239 4 1 if ($search_docprop // 1)
250 4 4 unless $statc
258 1 1 if ($chld->isa('Org::Element::Headline')) { }
1 0 elsif ($chld->isa('Org::Element::List')) { }
260 0 3 unless $el->isa("Org::Element::Headline")
261 3 0 if ($el->is_todo)
263 1 2 if $el->is_done
269 0 1 unless $el->isa("Org::Element::List")
271 0 3 unless $el2->isa("Org::Element::ListItem")
273 3 0 if (defined $state)
275 2 1 if $state eq "X"
284 1 3 if ($statc =~ /%/l) { }
285 1 0 $num_total == 0 ? :