Branch Coverage

lib/Graph/Easy/As_graphviz.pm
Criterion Covered Total %
branch 215 324 66.3


line true false branch
114 42 0 unless $name =~ /^x-dot-/
132 311 252 unless defined $color
134 57 195 if (not ref $object and $object eq 'graph')
137 53 4 if $name eq 'fill'
153 278 75 unless ($color =~ /^#/)
157 1 277 if ($color =~ /^hsv\(([0-9\.]+),([0-9\.]+),([0-9\.]+)\)/) { }
164 205 72 ref $self ? :
195 98 0 ref $object ? :
199 72 26 unless (defined $color)
201 72 0 ref $object ? :
206 0 98 unless defined $color
209 2 96 if $style =~ /^double/
221 0 5 unless defined $style
223 0 5 if $style =~ /^dot-/
224 0 5 if $style =~ /^wave/
227 2 3 if $style eq 'double'
228 1 4 if $style =~ /^double-dash/
230 0 5 if $style eq 'invisible'
233 0 5 if $style =~ /^bold-dash/
234 0 5 if $style =~ /^broad/
235 0 5 if $style =~ /^wide/
237 3 2 if $style eq 'solid'
247 208 0 unless ref $self and defined $angle
249 0 0 if $angle == 0
262 0 4 unless ref $self and defined $side
268 0 4 if $side =~ /,/
274 2 2 if $name eq 'end'
296 19 0 if ($style =~ /^([\d\.]+)em\z/) { }
0 0 elsif ($style =~ /^([\d\.]+)%\z/) { }
0 0 elsif ($style =~ /^([\d\.]+)px\z/) { }
323 208 14 if ref $node
326 3 219 if $shape =~ /^(none|invisible|img|point)\z/
328 196 23 unless defined $style
332 0 219 unless defined $style
334 0 219 if $style =~ /^dot-/
335 0 219 if $style =~ /^double-/
336 0 219 if $style =~ /^wave/
339 1 218 if $style eq 'double'
342 0 219 if $style =~ /^bold/
343 4 215 if $style =~ /^broad/
344 0 219 if $style =~ /^wide/
347 203 16 if ref $node and $style ne 'none'
348 18 201 if $w == 0
351 18 201 if ($style eq 'none')
353 4 14 if ref $node
358 195 24 if $style =~ /^(|solid)\z/ and $shape ne 'rounded'
361 1 23 if $style eq 'solid'
362 5 19 unless $style eq 'filled'
363 1 23 if $shape eq 'rounded' and $style ne 'none'
376 0 306 unless ref $object
378 306 0 unless defined $l
388 0 98 unless ref $self
391 95 3 if ($self->label || '') eq ''
393 2 1 unless defined $color
396 2 1 unless defined $color
408 1 51 if $style =~ /^(img|rounded)\z/
413 3 48 if $style =~ /^(invisible|none|point)\z/
415 51 0 if (ref $object)
418 0 51 if $border eq 'none'
430 106 7 if $style =~ /^(none|open)\z/
431 2 111 if $style eq 'closed'
434 6 107 if $$self{'_flip_edges'}
446 208 53 if ref $node
448 208 53 if (ref $node)
455 0 208 if $align eq 'left'
456 0 208 if $align eq 'right'
464 208 53 if ref $node
467 0 261 if ($shape eq 'img')
493 110 530 unless $v =~ /^[a-z0-9A-Z]+\z/
496 0 640 if $name eq 'k'
502 246 0 if ($att ne '')
505 107 139 if (not $att =~ /\n.*\n/ and length $att < 40) { }
531 0 0 if $$self{'_flip_edges'}
532 0 0 if ($from->isa('Graph::Easy::Group'))
543 0 0 if ($to->isa('Graph::Easy::Group'))
558 0 0 if $b ne ''
559 0 0 if ($att ne '')
561 0 0 if ($edge_att eq '') { }
579 0 0 if $att eq ''
606 0 98 if $$e{'from'}->isa('Graph::Easy::Group') or $$e{'to'}->isa('Graph::Easy::Group')
622 94 4 !$$self{'_flip_edges'} ? :
623 4 94 $$self{'_flip_edges'} ? :
627 2 96 if ($e->has_ports)
632 0 2 if defined $side and @port > 0
634 0 2 if (@edges > 1)
641 0 0 unless (defined $invis_id)
654 0 0 if ($$e{'group'})
660 0 0 if ($$self{'_flip_edges'}) { }
677 0 2 if defined $side and @port > 0
678 0 2 if (@edges > 1)
685 0 0 unless (defined $invis_id)
697 0 0 if ($$e{'group'})
703 0 0 if ($$self{'_flip_edges'}) { }
719 4 94 if $$self{'_flip_edges'}
723 0 98 if $modify_edge
748 2 14 if $$group{'_p'}
768 0 14 unless defined $$copy{'borderstyle'}
773 0 14 unless defined $$out{'fillcolor'}
774 0 14 unless defined $$out{'labeljust'}
781 42 70 unless $v =~ /^[a-z0-9A-Z]+\z/
784 0 112 if $name eq 'k'
788 14 0 if $att ne ''
795 0 18 if $$n{'origin'}
805 0 0 if exists $$e{'_p'}
824 82 0 $type eq 'directed' ? :
826 82 0 $type eq 'digraph' ? :
834 0 82 unless defined $flow
840 4 78 if $flow == 270 or $flow == 0
854 0 246 if $class =~ /\./
859 82 164 if ($class eq 'node') { }
82 82 elsif ($class eq 'graph') { }
82 0 elsif ($class eq 'edge') { }
861 82 0 unless $$out{'shape'}
862 82 0 unless $$out{'style'}
863 82 0 unless $$out{'fontsize'}
864 82 0 unless $$out{'fillcolor'}
868 50 32 if $flow == 90 or $flow == 270
869 2 80 if defined $$out{'label'} and not defined $$out{'labelloc'}
870 11 71 if $groups > 0
874 4 78 if $flow == 270 or $flow == 0
882 246 0 if $att ne ''
885 82 0 if $txt ne ''
891 11 71 if $groups > 0
904 0 82 unless defined $root
910 18 190 if exists $$n{'_p'}
913 0 190 if $$n{'origin'}
915 124 66 if ($att ne '')
923 63 19 if $count > 0
932 12 196 if (@out == 0 and (scalar $n->predecessors || 0) == 0)
935 0 12 unless exists $$n{'_p'} or $$n{'origin'}
944 0 98 if exists $$e{'_p'}
954 0 98 if $$e{'from'}->isa('Graph::Easy::Group') or $$e{'to'}->isa('Graph::Easy::Group')
977 116 190 unless defined $root
982 0 306 unless ref $$self{'graph'}
998 1542 98 if (ref $$remap{$base_class}{$name} or ref $$remap{'all'}{$name}) { }
1002 1366 176 unless (defined $$a{$name})
1006 2 1193 if (defined $b_attr and defined $c_attr and $b_attr ne $c_attr)
1009 0 2 unless defined $$a{$name}
1016 95 3 unless defined $$a{$name} and $$a{$name} ne 'inherit'
1023 171 37 if not $self->isa('Graph::Easy::Edge') and exists $$a{'label'} and $$a{'label'} eq $$self{'name'}
1028 0 306 if (not $$self{'origin'} and $$self{'children'} and keys %{$$self{'children'};} > 0)
1037 1 305 if ($$self{'bidirectional'})
1045 1 305 if ($$self{'undirected'})
1052 208 98 unless ($self->isa_cell)
1057 0 208 if $style =~ /^double/ and $w > 0
1063 3 303 if ($class =~ /node/ and $shape eq 'plaintext')
1067 2 1 if $$a{'fillcolor'} eq 'inherit'
1070 208 98 unless $self->isa_cell
1073 1 305 if ($shape eq 'point')
1083 0 1 if $style eq ''
1085 1 305 if ($shape eq 'invisible')
1090 2 304 if $root ne '' and $root eq $$self{'name'}
1099 0 530 if ($atr eq 'label' and $v =~ /^<
1106 428 102 if not $v =~ /^[a-z0-9A-Z]+\z/ or $atr eq 'URL'
1110 0 530 if $name eq 'k'
1117 224 82 if $att ne ''
1141 0 0 unless $ay <=> $by
1145 0 0 if ($y > $old_y)
1153 0 0 unless defined $portname
1159 0 0 if ($x - $old_x > 0)
1178 0 196 if exists $$n{'_graphviz_portname'}
1195 95 452 if not $name =~ /^([a-zA-Z_]+|\d+)\z/ or $name =~ /^(subgraph|graph|node|edge|strict)\z/i