Branch Coverage

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


line true false branch
54 3 17761 unless $result =~ /\d/ and ($result >= -1 and $result <= 1)
74 3 3 unless ref $func eq 'CODE'
92 2987 59 ref $self->{'_root'} ? :
118 30 1 if ref $self->{'_root'}
127 1279 5 if (defined $key and defined $value) { }
1 4 elsif (not defined $value and (&blessed($key) and $key->isa('Tree::Binary::Search::Node'))) { }
139 32 1248 if ($self->isEmpty) { }
140 1 31 unless defined $self->{'_comparison_func'}
151 2 7322 if $comparison == 0
153 3831 3491 if ($comparison == -1) { }
3491 0 elsif ($comparison == 1) { }
159 3203 628 if ($current->hasLeft) { }
174 2876 615 if ($current->hasRight) { }
188 1 7 if $self->isEmpty
190 3 4 unless defined $key and defined $value
198 2 6 if ($comparison == 0) { }
2 4 elsif ($comparison == -1) { }
4 0 elsif ($comparison == 1) { }
205 1 1 unless $current->hasLeft
212 1 3 unless $current->hasRight
221 1 17 if $self->isEmpty
223 1 16 unless defined $key
229 13 39 if ($comparison == 0) { }
21 18 elsif ($comparison == -1) { }
18 0 elsif ($comparison == 1) { }
240 1 20 unless $current->hasLeft
250 2 16 unless $current->hasRight
260 1 1708 unless defined $key
262 21 1687 if $self->isEmpty
267 507 9829 if ($comparison == 0) { }
5164 4665 elsif ($comparison == -1) { }
4665 0 elsif ($comparison == 1) { }
278 597 4567 unless $current->hasLeft
288 583 4082 unless $current->hasRight
297 1 2 if $self->isEmpty
306 1 2 if $self->isEmpty
340 1 24 if $self->isEmpty
342 1 23 unless defined $key
348 21 20 if ($comparison == 0) { }
14 6 elsif ($comparison == -1) { }
6 0 elsif ($comparison == 1) { }
350 1 20 if ($current->isLeaf) { }
352 1 0 if ($current->isRoot) { }
370 4 16 if (not $current->hasRight) { }
386 5 11 if (not $right->hasLeft) { }
390 5 0 if $current->hasLeft
407 3 8 if ($inorder_successor->hasRight) { }
413 9 2 if $current->hasLeft
414 11 0 if $current->hasRight
423 1 13 unless $current->hasLeft
429 1 5 unless $current->hasRight
440 9 11 if ($tree->isRoot) { }
446 9 2 if ($parent->hasLeft and $parent->getLeft eq $tree) { }
2 0 elsif ($parent->hasRight and $parent->getRight eq $tree) { }
448 9 0 if $replacement
452 2 0 if $replacement