Branch Coverage

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


line true false branch
54 3 11681 unless $result =~ /\d/ and ($result >= -1 and $result <= 1)
74 3 3 unless ref $func eq 'CODE'
92 2172 59 ref $self->{'_root'} ? :
118 30 1 if ref $self->{'_root'}
127 950 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 919 if ($self->isEmpty) { }
140 1 31 unless defined $self->{'_comparison_func'}
151 2 4875 if $comparison == 0
153 2262 2613 if ($comparison == -1) { }
2613 0 elsif ($comparison == 1) { }
159 1802 460 if ($current->hasLeft) { }
174 2159 454 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 1222 unless defined $key
262 21 1201 if $self->isEmpty
267 350 6353 if ($comparison == 0) { }
2969 3384 elsif ($comparison == -1) { }
3384 0 elsif ($comparison == 1) { }
278 429 2540 unless $current->hasLeft
288 422 2962 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