Branch Coverage

lib/Graph/Easy/Layout.pm
Criterion Covered Total %
branch 147 228 64.4


line true false branch
72 0 502 if ref $root
78 0 2112 if $root and $n == $root
83 0 2112 if defined $rank_att and $rank_att eq 'auto'
86 0 2112 if defined $rank_att and $rank_att eq 'same'
89 8 2104 if defined $rank_att
95 913 1199 if not defined $n->{'rank'} and $n->predecessors == 0
98 921 1191 if defined $n->{'rank'}
99 1191 921 unless defined $n->{'rank'}
129 8 2104 if $l > 0
135 1159 307 unless (defined $o->{'rank'})
144 49 479 unless @also
150 1159 32 if defined $n->{'rank'}
179 0 791 if $self->{'debug'}
204 31 1721 if $e->{'from'} == $e->{'to'}
209 0 1721 if $e->{'to'}->isa('Graph::Easy::Group') or $e->{'from'}->isa('Graph::Easy::Group')
214 27 1694 if $e->{'bidirectional'} and $to == $node
217 835 886 if $to == $node
227 11 875 if (defined $e->edge_flow)
233 12 863 if exists $to->{'_c'}
236 10 853 if defined $to->{'_chain'} and $to->{'_chain'} == $c
239 82 771 if $to->find_grandparent == $node->find_grandparent
245 578 567 if keys %suc == 0
247 441 126 if (scalar keys %suc == 1)
252 354 87 unless (defined $s->{'_chain'})
258 0 354 if $self->{'debug'}
272 0 213 if $self->{'debug'}
280 0 404 if $self->{'debug'}
283 260 144 unless defined $s->{'_chain'}
285 0 404 if $s->{'_chain'} == $c
292 278 126 if $ch->{'len'} > $max
295 0 213 if (defined $next_chain and $self->{'debug'})
308 213 0 if (defined $next_chain)
310 0 213 if $self->{'debug'}
312 0 213 if ($self->{'debug'})
321 212 1 unless $next == $self->{'_root'}
324 164 49 if $next_chain->{'len'} == 0
330 0 791 if $self->{'debug'}
341 0 280 if $self->{'debug'}
357 151 1024 if defined $n->{'origin'} and $n->{'origin'} != $n
373 0 109 unless $aa->[2] <=> $bb->[2] or $aa->[1] <=> $bb->[1] or $aa->[0] <=> $bb->[0]
382 280 791 unless defined $name
389 282 509 unless defined $self->{'_root'}
391 228 563 if $done == $todo
394 531 32 unless defined $n->{'_chain'}
397 0 7 if $done != $todo and $self->{'debug'}
398 0 273 if $done == $todo and $self->{'debug'}
414 0 0 if ($action_type == 0) { }
0 0 elsif ($action_type == 2) { }
0 0 elsif ($action_type == 1) { }
0 0 elsif ($action_type == 3) { }
0 0 elsif ($action_type == 4) { }
417 0 0 if defined $edge
423 0 0 if ref $edge
460 201 1926 if keys %{$$node{'children'};} > 0
477 0 279 if @_ > 1
480 0 279 if $args->{'type'} and $args->{'type'} eq 'force'
485 0 279 unless defined $DB::single
488 0 279 if $self->{'debug'}
495 0 279 if ($type eq 'force') { }
524 0 279 if $@
561 0 0 defined $self->{'name'} ? :
0 280 if $self->{'debug'}
597 274 6 if ref $root
599 0 280 if ($self->{'debug'})
603 0 0 unless $Graph::Easy::a->{'len'} <=> $Graph::Easy::b->{'len'}
636 0 113 unless ($Graph::Easy::b->{'start'} == $root) <=> ($Graph::Easy::a->{'start'} == $root) or $Graph::Easy::b->{'len'} <=> $Graph::Easy::a->{'len'} or defined $Graph::Easy::a->{'start'}{'origin'} <=> defined $Graph::Easy::b->{'start'}{'origin'}
638 0 605 if $self->{'debug'}
642 440 165 unless $chain->{'_done'}
645 0 280 if $self->{'debug'}
647 0 280 if $self->{'debug'}
663 1703 66 unless exists $e->{'_todo'}
667 0 66 if $e->{'to'}->isa('Graph::Easy::Group') or $e->{'from'}->isa('Graph::Easy::Group')
685 0 280 if $self->{'debug'}
689 31 249 if (scalar $self->groups > 0)
691 31 0 if scalar $self->groups
699 0 280 if $self->{'debug'}
708 0 280 if $self->{'debug'}
721 61 219 if $flow == 0 or $flow == 180
728 0 3057 if ($self->{'debug'} and $step % 1 == 0)
733 0 0 if $nodes > 230
744 1508 1549 if ($action_type == 0) { }
619 930 elsif ($action_type == 2) { }
899 31 elsif ($action_type == 1) { }
31 0 elsif ($action_type == 4) { }
747 0 1508 if $self->{'debug'}
749 1142 366 if defined $node->{'x'}
751 366 1142 unless defined $node->{'x'}
756 0 619 if $self->{'debug'}
758 6 613 if defined $node->{'x'}
759 613 6 unless defined $node->{'x'}
768 0 899 if $self->{'debug'}
770 2 897 unless (defined $dst->{'x'})
775 1 898 unless (defined $src->{'x'})
787 31 0 unless $self->{'error'}
796 0 3057 unless (defined $mod)
799 0 0 if ($action_type == 0 or $action_type == 2) { }
801 0 0 if $self->{'debug'}
804 0 0 if defined $action->[1]{'x'}
807 0 0 if $tries == 0
811 0 0 if $self->{'debug'}
831 0 0 if $tries == 0
839 0 3057 if $self->{'debug'}
847 3 277 if ($nodes != $e_nodes or $edges != $e_edges) { }
869 1133 0 if defined $n->{'x'}
876 897 4 if scalar @{$e->{'cells'};} > 0 and not exists $e->{'_todo'}
903 646 239 if @$cells < 2
906 0 239 if $self->{'debug'}
923 515 0 if ($t1 == $t2 and $t1 == 1 || $t1 == 2)
947 127 388 if ($f->{$co} > $c->{$co})
966 10 1092 if $c->{'type'} == 11
967 525 577 if ($delete)
970 515 10 if ($delete == 1) { }
976 515 0 unless $all_cells->{$xy}
994 0 277 if $self->{'debug'}