Branch Coverage

blib/lib/Tree/Bulk.pm
Criterion Covered Total %
branch 218 296 73.6


line true false branch
20 0 0 if -e $l
37 518 44 $up ? :
548 14 $key ? :
548 14 $data ? :
47 518 44 if ($up)
48 518 0 if ($side) { }
53 0 0 unless $side
63 0 116664 unless $tree
64 3069 113595 !$tree->up ? :
69 0 1334 unless $tree
76 0 93847 unless $tree
77 47958 6679 !$tree->left ? :
54637 39210 if $tree and not $tree->right
82 0 489 unless $tree
83 2 1 $tree->left ? :
3 486 if $tree->right
88 0 73696 unless $tree
89 36310 37386 $tree->left ? :
94 0 9460 unless $tree
95 0 9460 unless $tree->right xor $tree->left
96 31 9429 if $tree->right and not $tree->right->leaf
97 8 9421 if $tree->left and not $tree->left->leaf
103 0 3442 unless $tree
104 492 1756 !@{$tree->keys} ? :
2248 1194 if $tree->leaf
109 0 4378 unless $tree
110 394 1353 $tree->isRoot ? :
1747 2631 if $tree->leaf
115 0 726 unless $tree
116 379 193 $tree->up->left == $tree ? :
572 154 if $tree->up and $tree->up->left
121 0 170 unless $tree
122 90 34 $tree->up->right == $tree ? :
124 46 if $tree->up and $tree->up->right
127 0 74474 unless $tree
133 0 3 unless $tree
139 0 1011 unless $tree
148 5894 24288 unless $tree
154 2900 4574 $a > $b ? :
159 0 7472 unless $tree
174 0 487 unless $n
176 318 169 unless $p
178 1 168 unless $r
180 89 79 $n->isRightChild ? :
182 43 125 if $L
189 0 467 unless $n
191 229 238 unless $p
193 1 237 unless $l
195 134 103 $n->isLeftChild ? :
197 94 143 if $R
213 0 6751 unless $t
216 425 6326 if ($l > 2 * $r + 1) { }
437 5889 elsif ($r > 2 * $l + 1) { }
217 425 0 if (my $l = $t->left)
218 48 377 if (&actualHeight(scalar $l->right) > &actualHeight(scalar $l->left))
225 437 0 if (my $r = $t->right)
226 40 397 if (&actualHeight(scalar $r->left) > &actualHeight(scalar $r->right))
303 0 1234 unless $tree
304 0 1234 unless defined $key
310 0 97922 unless $tree
311 0 97922 unless defined $key
312 0 97922 unless $key =~ /\A\d+\Z/
316 515871 2 if ($tree)
318 0 515871 unless @$keys
320 192595 323276 if $key < $keys->[0]
321 225356 97920 if $key > $keys->[-1]
325 0 237672 unless defined $v
326 97920 139752 if $key == $keys->[$i]
335 0 356 unless $n
342 0 412 unless $n
349 0 1079 unless $tree
350 830 249 if (my $r = $tree->right)
351 347 483 $r->left ? :
355 240 240 unless $p->up and $p->up->right and $p->up->right == $p
362 0 827 unless $tree
363 800 27 if (my $l = $tree->left)
364 411 389 $l->right ? :
368 26 28 unless $p->up and $p->up->left and $p->up->left == $p
375 0 8 unless $tree
385 0 487 unless $t
386 0 487 if &duplex($t)
387 0 487 unless my $p = $t->up
390 244 243 $t->isLeftChild ? :
391 1 486 if $c
394 129 358 if (my $l = $p->left) { }
129 229 elsif (my $r = $p->right) { }
406 0 590 unless $target
407 0 590 unless $target->right
408 0 590 unless my $source = $target->next
414 222 368 if $source->empty
421 0 772 unless $target
422 0 772 unless $target->left
423 0 772 unless my $source = $target->prev
430 93 679 if $source->empty
436 0 4377 unless $tree
437 393 3984 if $tree->singleton
438 1910 2074 if @{$tree->keys} == $tree->keysPerNode
440 171 1903 if ($tree->empty) { }
1886 17 elsif (@{$tree->keys} < $tree->keysPerNode) { }
441 171 0 unless $tree->isRoot
445 982 904 if (not $tree->leaf)
446 590 392 if $tree->right
447 772 210 if $tree->left
460 0 1167 unless $tree
461 0 1167 unless defined $key
465 0 4661 unless $tree
466 0 4661 unless @{$tree->keys}
467 1653 3008 if ($key < $tree->keys->[0]) { }
1841 1167 elsif ($key > $tree->keys->[-1]) { }
1167 0 elsif (grep {$_ == $key;} @{$tree->keys}) { }
472 1167 3034 if $tree->keys->[$i] == $key
484 279 243 unless $t
488 126 36 $t->up && $t->up->right && $t->up->right == $t ? :
81 162 $t->up && $t->up->left && $t->up->left == $t ? :
490 5 21 $t->left ? :
74 26 $t->left && $t->right ? :
33 100 $t->isRoot ? :
110 133 $t->leaf ? :
493 207 36 if $t->up
501 0 36 unless $t
511 0 81 unless $tree
512 0 81 unless $N and $N > 0
539 75026 73694 unless $tree
541 0 73694 if $seen{$tree->name}++
550 0 1332 unless $tree
557 75026 73694 unless $tree
562 0 73694 unless @{$tree->keys} == @{$tree->data}
564 0 73694 if (not $tree->leaf || $tree->isRoot and @{$tree->keys} != $tree->keysPerNode)
570 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
574 0 36310 if $tree->left and !$tree->left->up || $tree->left->up != $tree
577 0 36052 if $tree->right and !$tree->right->up || $tree->right->up != $tree
580 0 6 if ($tree->simplex and not $tree->simplexWithLeaf and $tree->up and not $tree->up->isRoot and not $tree->up->duplex)
586 9677 64017 if $tree->height > $maxHeight
589 0 73694 unless @k <= $tree->keysPerNode
591 0 147852 unless defined $k[$i]
595 0 73694 unless @d <= $tree->keysPerNode
599 0 74161 if $k[$i - 1] >= $k[$i]
600 0 74161 if $k{$k[$i]}++
601 0 74161 unless defined $d[$i]
605 0 1332 if ($tree->height < $maxHeight)
617 0 97914 unless my $f = &find($t, $k)
618 0 97914 unless $f == $v
623 44691 43783 unless $t
627 0 97914 unless delete $t{$_}
632 0 908 if CORE::keys %t
2639 0 1 if eval "eof(${p}::DATA)"
2641 0 1 if $@
2643 0 1 if $@