Branch Coverage

blib/lib/Tree/Binary/Search.pm
Criterion Covered Total %
branch 101 112 90.1


line true false branch
53 3 13437 unless $result =~ /\d/ and ($result >= -1 and $result <= 1)
73 3 3 unless ref $func eq 'CODE'
91 2455 59 ref $self->{'_root'} ? :
117 30 1 if ref $self->{'_root'}
126 1082 5 if (defined $key and defined $value) { }
1 4 elsif (not defined $value and (&blessed($key) and $key->isa('Tree::Binary::Search::Node'))) { }
138 32 1051 if ($self->isEmpty) { }
139 1 31 unless defined $self->{'_comparison_func'}
150 2 5703 if $comparison == 0
152 2837 2866 if ($comparison == -1) { }
2866 0 elsif ($comparison == 1) { }
158 2309 528 if ($current->hasLeft) { }
173 2348 518 if ($current->hasRight) { }
187 1 7 if $self->isEmpty
189 3 4 unless defined $key and defined $value
197 2 6 if ($comparison == 0) { }
2 4 elsif ($comparison == -1) { }
4 0 elsif ($comparison == 1) { }
204 1 1 unless $current->hasLeft
211 1 3 unless $current->hasRight
220 1 17 if $self->isEmpty
222 1 16 unless defined $key
228 13 39 if ($comparison == 0) { }
21 18 elsif ($comparison == -1) { }
18 0 elsif ($comparison == 1) { }
239 1 20 unless $current->hasLeft
249 2 16 unless $current->hasRight
259 1 1373 unless defined $key
261 21 1352 if $self->isEmpty
266 369 7262 if ($comparison == 0) { }
3581 3681 elsif ($comparison == -1) { }
3681 0 elsif ($comparison == 1) { }
277 497 3084 unless $current->hasLeft
287 486 3195 unless $current->hasRight
296 1 2 if $self->isEmpty
305 1 2 if $self->isEmpty
339 1 24 if $self->isEmpty
341 1 23 unless defined $key
347 21 20 if ($comparison == 0) { }
14 6 elsif ($comparison == -1) { }
6 0 elsif ($comparison == 1) { }
349 1 20 if ($current->isLeaf) { }
351 1 0 if ($current->isRoot) { }
369 4 16 if (not $current->hasRight) { }
385 5 11 if (not $right->hasLeft) { }
389 5 0 if $current->hasLeft
406 3 8 if ($inorder_successor->hasRight) { }
412 9 2 if $current->hasLeft
413 11 0 if $current->hasRight
422 1 13 unless $current->hasLeft
428 1 5 unless $current->hasRight
439 9 11 if ($tree->isRoot) { }
445 9 2 if ($parent->hasLeft and $parent->getLeft eq $tree) { }
2 0 elsif ($parent->hasRight and $parent->getRight eq $tree) { }
447 9 0 if $replacement
451 2 0 if $replacement