Branch Coverage

blib/lib/Tree/Bulk.pm
Criterion Covered Total %
branch 216 296 72.9


line true false branch
22 0 0 if -e $l
39 518 44 $up ? :
548 14 $key ? :
548 14 $data ? :
49 518 44 if ($up)
50 518 0 if ($side) { }
55 0 0 unless $side
65 0 116664 unless $tree
66 3069 113595 !$tree->up ? :
71 0 1334 unless $tree
78 0 93847 unless $tree
79 47958 6679 !$tree->left ? :
54637 39210 if $tree and not $tree->right
84 0 489 unless $tree
85 2 1 $tree->left ? :
3 486 if $tree->right
90 0 73696 unless $tree
91 36310 37386 $tree->left ? :
96 0 9460 unless $tree
97 0 9460 unless $tree->right xor $tree->left
98 31 9429 if $tree->right and not $tree->right->leaf
99 8 9421 if $tree->left and not $tree->left->leaf
105 0 3442 unless $tree
106 492 1756 !@{$tree->keys} ? :
2248 1194 if $tree->leaf
111 0 4378 unless $tree
112 394 1353 $tree->isRoot ? :
1747 2631 if $tree->leaf
117 0 726 unless $tree
118 379 193 $tree->up->left == $tree ? :
572 154 if $tree->up and $tree->up->left
123 0 170 unless $tree
124 90 34 $tree->up->right == $tree ? :
124 46 if $tree->up and $tree->up->right
129 0 74474 unless $tree
135 0 3 unless $tree
141 0 1011 unless $tree
150 5894 24288 unless $tree
156 2900 4574 $a > $b ? :
161 0 7472 unless $tree
177 0 487 unless $n
179 318 169 unless $p
181 1 168 unless $r
183 89 79 $n->isRightChild ? :
185 43 125 if $L
192 0 467 unless $n
194 229 238 unless $p
196 1 237 unless $l
198 134 103 $n->isLeftChild ? :
200 94 143 if $R
218 0 6751 unless $t
222 425 6326 if ($l > 2 * $r + 1) { }
437 5889 elsif ($r > 2 * $l + 1) { }
223 425 0 if (my $l = $t->left)
224 48 377 if (&actualHeight(scalar $l->right) > &actualHeight(scalar $l->left))
231 437 0 if (my $r = $t->right)
232 40 397 if (&actualHeight(scalar $r->left) > &actualHeight(scalar $r->right))
310 0 1234 unless $tree
311 0 1234 unless defined $key
317 0 97922 unless $tree
318 0 97922 unless defined $key
319 0 97922 unless $key =~ /\A\d+\Z/
323 515871 2 if ($tree)
325 0 515871 unless @$keys
327 192595 323276 if $key < $keys->[0]
328 225356 97920 if $key > $keys->[-1]
332 0 237672 unless defined $v
333 97920 139752 if $key == $keys->[$i]
342 0 356 unless $n
349 0 412 unless $n
356 0 1079 unless $tree
357 830 249 if (my $r = $tree->right)
358 347 483 $r->left ? :
362 240 240 unless $p->up and $p->up->right and $p->up->right == $p
369 0 827 unless $tree
370 800 27 if (my $l = $tree->left)
371 411 389 $l->right ? :
375 26 28 unless $p->up and $p->up->left and $p->up->left == $p
382 0 8 unless $tree
392 0 487 unless $t
393 0 487 if &duplex($t)
394 0 487 unless my $p = $t->up
397 244 243 $t->isLeftChild ? :
398 1 486 if $c
401 129 358 if (my $l = $p->left) { }
129 229 elsif (my $r = $p->right) { }
413 0 590 unless $target
414 0 590 unless $target->right
415 0 590 unless my $source = $target->next
421 222 368 if $source->empty
428 0 772 unless $target
429 0 772 unless $target->left
430 0 772 unless my $source = $target->prev
437 93 679 if $source->empty
443 0 4377 unless $tree
444 393 3984 if $tree->singleton
445 1910 2074 if @{$tree->keys} == $tree->keysPerNode
447 171 1903 if ($tree->empty) { }
1886 17 elsif (@{$tree->keys} < $tree->keysPerNode) { }
448 171 0 unless $tree->isRoot
452 982 904 if (not $tree->leaf)
453 590 392 if $tree->right
454 772 210 if $tree->left
467 0 1167 unless $tree
468 0 1167 unless defined $key
472 0 4661 unless $tree
473 0 4661 unless @{$tree->keys}
474 1653 3008 if ($key < $tree->keys->[0]) { }
1841 1167 elsif ($key > $tree->keys->[-1]) { }
1167 0 elsif (grep {$_ == $key;} @{$tree->keys}) { }
479 1167 3034 if $tree->keys->[$i] == $key
491 279 243 unless $t
495 126 36 $t->up && $t->up->right && $t->up->right == $t ? :
81 162 $t->up && $t->up->left && $t->up->left == $t ? :
497 5 21 $t->left ? :
74 26 $t->left && $t->right ? :
33 100 $t->isRoot ? :
110 133 $t->leaf ? :
500 207 36 if $t->up
508 0 36 unless $t
518 0 81 unless $tree
519 0 81 unless $N and $N > 0
546 75026 73694 unless $tree
548 0 73694 if $seen{$tree->name}++
557 0 1332 unless $tree
564 75026 73694 unless $tree
569 0 73694 unless @{$tree->keys} == @{$tree->data}
571 0 73694 if (not $tree->leaf || $tree->isRoot and @{$tree->keys} != $tree->keysPerNode)
577 0 36052 unless $tree->isRoot or $tree->up and $tree->up->left and $tree == $tree->up->left or $tree->up and $tree->up->right and $tree == $tree->up->right
581 0 36310 if $tree->left and !$tree->left->up || $tree->left->up != $tree
584 0 36052 if $tree->right and !$tree->right->up || $tree->right->up != $tree
587 0 6 if ($tree->simplex and not $tree->simplexWithLeaf and $tree->up and not $tree->up->isRoot and not $tree->up->duplex)
593 9677 64017 if $tree->height > $maxHeight
596 0 73694 unless @k <= $tree->keysPerNode
598 0 147852 unless defined $k[$i]
602 0 73694 unless @d <= $tree->keysPerNode
606 0 74161 if $k[$i - 1] >= $k[$i]
607 0 74161 if $k{$k[$i]}++
608 0 74161 unless defined $d[$i]
612 0 1332 if ($tree->height < $maxHeight)
624 0 97914 unless my $f = &find($t, $k)
625 0 97914 unless $f == $v
630 44691 43783 unless $t
634 0 97914 unless delete $t{$_}
639 0 908 if CORE::keys %t
2646 1 0 if eval "eof(${p}::DATA)"
2648 0 0 if $@
2650 0 0 if $@