Branch Coverage

blib/lib/Tree/BPTree.pm
Criterion Covered Total %
branch 82 96 85.4


line true false branch
178 577 7752 unless @data
240 93749 169982 if (&$cmp($key, $$self[$k * 2 + 1]) < 0)
260 660 26328 if ((@$self + 1) / 2 == $n and defined $result) { }
2496 23832 elsif (defined $result) { }
280 324 336 if ($v < $n / 2) { }
216 120 elsif ($v > $n / 2) { }
338 5226 1008 if ($$self[$v * 2]->isa('Tree::BPTree::Leaf')) { }
342 536 4690 if ($result == 1)
349 316 220 if ($v == 0) { }
361 192 816 if ($result <= $n / 2)
363 28 164 if ($v > 0 and (@{$$self[($v - 1) * 2];} + 1) / 2 + (@{$$self[$v * 2];} + 1) / 2 <= $n) { }
82 82 elsif ($v < (@$self + 1) / 2 - 1 and (@{$$self[$v * 2];} + 1) / 2 + (@{$$self[($v + 1) * 2];} + 1) / 2 <= $n) { }
381 34 48 if ($v > 0) { }
394 34 48 if ($v > 0) { }
420 34 48 if ((@$that + 1) / 2 < (@$self + 1) / 2) { }
468 120180 1007432 if (&$cmp($key, $$self[$k * 2 + 1]) <= 0)
478 3216 34224 if ((@$self + 1) / 2 == $n) { }
576 1 576 unless defined $args{-'n'}
577 577 0 unless defined $args{-'keycmp'}
578 577 0 unless defined $args{-'valuecmp'}
579 577 0 unless defined $args{-'unique'}
587 0 577 if $args{-'n'} < 3
625 20928 0 if (&$cmp($$leaf[$v * 2 + 1], $key) == 0) { }
626 10464 10464 wantarray ? :
654 25344 37440 if (defined $$leaf[$k * 2 + 1] and &$cmp($$leaf[$k * 2 + 1], $key) == 0)
655 0 25344 if $$self{-'unique'}
662 720 36720 if defined $new_root
699 5232 0 if (defined $$leaf[$i * 2 + 1] and &$cmp($$leaf[$i * 2 + 1], $key) == 0) { }
700 2112 3120 if (scalar @{$$leaf[$i * 2];} > 1) { }
0 3120 elsif (not grep({&$valcmp($value, $_) == 0;} @{$$leaf[$i * 2];})) { }
706 2112 0 if @$bucket > 0
724 60 3060 if not $$self{-'root'}->isa('Tree::BPTree::Leaf') and $values == 1
741 0 96 if (defined $$self{-'reverse_keycmp'}) { }
837 0 5232 unless defined $$self{-'last'}
853 0 5232 unless defined $$self{-'last'}
867 2112 3120 if (@{$$leaf[$i];} > 1)
876 2112 0 if defined $$self{-'node'} and $$self{-'last'}{-'node'} == $$self{-'node'}
887 60 3060 if not $$self{-'tree'}{-'root'}->isa('Tree::BPTree::Leaf') and $values == 1
892 2804 316 if defined $$self{-'node'} and $$self{-'last'}{-'node'} == $$self{-'node'}
920 776161 21024 unless defined $cursor
938 17617 779568 unless (defined $$cursor{-'index'})
944 784800 12385 if (defined $$cursor{-'node'} and @{$$cursor{-'node'};} > 1) { }
958 492576 292224 if ($$cursor{-'value'} == $#{$$cursor{-'node'}[$$cursor{-'index'}];}) { }
963 61545 431031 if ($$cursor{-'index'} + 2 == $#{$$cursor{-'node'};}) { }
1011 0 5232 unless defined $cursor
1075 432 51888 if &$pred($k, $v)
1086 432 51888 if &$pred($k, $v)
1097 432 51888 if &$pred($k, $v)