Branch Coverage

blib/lib/Heap/MinMax.pm
Criterion Covered Total %
branch 92 164 56.1


line true false branch
52 0 0 if (@_)
146 0 0 if ($$self{'fcompare'}($obj, $elt) == 0)
153 0 0 if (defined $index)
182 0 3 unless ($arr_length)
206 0 2 unless ($arr_length)
240 0 0 unless ($arr_length)
246 0 0 if (&$evalfunc($top) == 0)
250 0 0 if ($n == 0) { }
255 0 0 if ($$array[$i] and $$self{'fcompare'}($$array[$i], $$array[$smallest]) == -1)
289 0 0 unless ($arr_length)
295 0 0 if (&$evalfunc($top) == 0)
299 0 0 if ($n == 0) { }
304 0 0 if ($$array[$i] and $$self{'fcompare'}($$array[$i], $$array[$smallest]) == -1)
337 0 2 unless ($arr_length)
342 0 2 if ($arr_length == 1)
347 0 2 if ($arr_length == 2)
352 1 1 $result >= 0 ? :
380 0 1 unless ($arr_length)
385 0 1 if ($arr_length == 1) { }
0 1 elsif ($arr_length == 2) { }
394 1 0 $result >= 0 ? :
423 0 3 if ($i >= @$array)
428 2 1 if ($level == 0) { }
0 1 elsif ($level % 2 == 0) { }
461 1 2 unless ($m)
465 1 1 if ($self->is_grandchild($index, $m)) { }
1 0 elsif ($$self{'fcompare'}($$array[$m], $$array[$index]) == -1) { }
466 1 0 if ($$self{'fcompare'}($$array[$m], $$array[$index]) == -1)
469 0 1 if ($$self{'fcompare'}($$array[$m], $self->parent($m)) == 1)
503 0 1 unless ($m)
505 0 1 if ($self->is_grandchild($index, $m)) { }
1 0 elsif ($$self{'fcompare'}($$array[$m], $$array[$index]) == 1) { }
506 0 0 if ($$self{'fcompare'}($$array[$m], $$array[$index]) == 1)
509 0 0 if ($$self{'fcompare'}($$array[$m], $self->parent($m)) == -1)
537 11 7 if ($level % 2 == 0) { }
538 8 3 if ($self->has_parent($i) != -1)
541 8 0 if ($$self{'fcompare'}($$array[$i], $$array[$parent_index]) == 1) { }
551 7 0 if ($self->has_parent($i) != -1)
554 4 3 if ($$self{'fcompare'}($$array[$i], $$array[$parent_index]) == -1) { }
580 1 4 if ($self->has_grandparent($i))
583 1 0 if ($$self{'fcompare'}($$array[$i], $$array[$gp_index]) == -1)
605 0 11 if ($self->has_grandparent($i))
608 0 0 if ($$self{'fcompare'}($$array[$i], $$array[$gp_index]) == 1)
627 16 0 if ($m < @$array and $index < @$array)
649 2 1 if ($self->has_children($index))
656 1 1 if ($rightnode)
663 1 1 if ($right_leftnode)
670 0 2 if ($right_rightnode)
678 2 0 if ($leftnode)
685 1 1 if ($left_leftnode)
691 1 1 if ($left_rightnode)
701 2 4 if ($i == 0) { }
2 2 elsif ($$self{'fcompare'}($descendants{$key}, $min_descendant) == -1) { }
730 1 0 if ($self->has_children($index))
737 1 0 if ($rightnode)
744 0 1 if ($right_leftnode)
751 0 1 if ($right_rightnode)
759 1 0 if ($leftnode)
766 0 1 if ($left_leftnode)
772 0 1 if ($left_rightnode)
783 1 1 if ($i == 0) { }
1 0 elsif ($$self{'fcompare'}($descendants{$key}, $max_descendant) == 1) { }
814 0 24 if (fp_equal($obj1, $obj2, 10))
817 8 16 if ($obj1 < $obj2)
835 7 50 if ($index == 0)
848 0 1 if ($index == 0)
852 1 0 if ($parent_index)
865 3 7 if ($r_index < @$array)
885 8 5 if ($l_index < @$array)
906 0 1 if ($index == 0)
911 1 0 if ($parent_index)
929 0 0 if (@$array == 0)
942 5 11 if ($parent_node_index)
943 1 4 if ($self->parent_node_index($parent_node_index) != -1)
955 15 3 if ($self->parent_node_index($i) != -1)
965 3 1 if ($self->left_node($i) or $self->right_node($i))
979 1 2 if ($gindex == $l_l_index)
983 0 2 if ($gindex == $l_r_index)
987 0 2 if ($gindex == $r_l_index)
991 0 2 if ($gindex == $r_r_index)
1006 7 18 if ($i == 0)
1036 0 0 unless (defined $val)