Branch Coverage

blib/lib/Image/SVG/Path.pm
Criterion Covered Total %
branch 121 176 68.7


line true false branch
40 84 117 if (lc $curve_type eq $curve_type) { }
117 0 elsif (uc $curve_type eq $curve_type) { }
62 0 0 unless ($path)
69 0 0 unless (@values)
78 0 0 if ($value->{'type'} eq 'cubic-bezier') { }
105 2 29 if ($t eq 'moveto') { }
0 29 elsif ($t eq 'cubic-bezier') { }
2 27 elsif ($t eq 'closepath') { }
14 13 elsif ($t eq 'vertical-line-to') { }
8 5 elsif ($t eq 'horizontal-line-to') { }
4 1 elsif ($t eq 'line-to') { }
1 0 elsif ($t eq 'arc') { }
341 0 63 unless ($path)
347 31 32 if ($options_ref) { }
348 0 31 if (ref $options_ref ne 'HASH')
355 0 63 unless (wantarray)
359 2 61 if ($verbose)
364 0 63 unless ($path[0] =~ /^$wsp*$/ and $path[1] =~ /[Mm]/)
373 28 173 unless (defined $values)
377 0 201 unless ($original =~ /$moveto|$drawto_command/x)
392 12 189 if ($verbose)
396 9 192 if (uc $command eq 'C') { }
7 185 elsif (uc $command eq 'S') { }
29 156 elsif (uc $command eq 'L') { }
33 123 elsif (uc $command eq 'Z') { }
6 117 elsif (uc $command eq 'Q') { }
4 113 elsif (uc $command eq 'T') { }
12 101 elsif (uc $command eq 'H') { }
21 80 elsif (uc $command eq 'V') { }
8 72 elsif (uc $command eq 'A') { }
72 0 elsif (uc $command eq 'M') { }
398 0 9 if (@numbers % $expect_numbers != 0)
423 0 7 if (@numbers % $expect_numbers != 0)
446 0 29 if (@numbers % $expect_numbers != 0)
454 0 33 if (@numbers > 0)
468 0 6 if (@numbers % $expect_numbers != 0)
487 0 4 if (@numbers % $expect_numbers != 0)
530 0 8 if (@numbers % $expect_numbers != 0)
547 0 72 if (@numbers < $expect_numbers)
550 0 72 if (@numbers % $expect_numbers != 0)
563 9 63 if (@numbers > $expect_numbers)
578 7 56 if ($absolute)
579 2 5 if ($verbose)
587 13 60 if ($element->{'type'} eq 'moveto') { }
18 42 elsif ($element->{'type'} eq 'line-to') { }
10 32 elsif ($element->{'type'} eq 'horizontal-line-to') { }
18 14 elsif ($element->{'type'} eq 'vertical-line-to') { }
0 14 elsif ($element->{'type'} eq 'cubic-bezier') { }
2 12 elsif ($element->{'type'} eq 'smooth-cubic-bezier') { }
1 11 elsif ($element->{'type'} eq 'quadratic-bezier') { }
2 9 elsif ($element->{'type'} eq 'smooth-quadratic-bezier') { }
1 8 elsif ($element->{'type'} eq 'arc') { }
8 0 elsif ($element->{'type'} eq 'closepath') { }
589 5 8 if ($element->{'position'} eq 'relative')
591 0 5 if ($ip) { }
592 0 0 if (ref $ip ne 'ARRAY' or scalar @$ip != 2)
605 17 1 if ($element->{'position'} eq 'relative')
608 6 12 if ($begin_drawing)
609 1 5 if ($verbose)
618 10 0 if ($element->{'position'} eq 'relative')
621 0 10 if ($begin_drawing)
622 0 0 if ($verbose)
631 18 0 if ($element->{'position'} eq 'relative')
634 4 14 if ($begin_drawing)
635 2 2 if ($verbose)
644 0 0 if ($element->{'position'} eq 'relative')
649 0 0 if ($begin_drawing)
650 0 0 if ($verbose)
659 2 0 if ($element->{'position'} eq 'relative')
663 2 0 if ($no_smooth)
666 1 1 if ($previous and $previous->{'type'} eq 'cubic-bezier') { }
675 1 1 if ($begin_drawing)
676 0 1 if ($verbose)
685 1 0 if ($element->{'position'} eq 'relative')
689 1 0 if ($begin_drawing)
690 0 1 if ($verbose)
699 2 0 if ($element->{'position'} eq 'relative')
702 2 0 if ($no_smooth)
705 1 1 if ($previous and $previous->{'type'} eq 'quadratic-bezier') { }
714 1 1 if ($begin_drawing)
715 0 1 if ($verbose)
725 1 0 if ($element->{'position'} eq 'relative')
729 0 1 if ($begin_drawing)
730 0 0 if ($verbose)
739 2 6 if ($verbose)
746 0 73 unless ($element->{'svg_key'})
766 0 38 if ($n_coords % 2 != 0)
773 29 25 $position eq 'absolute' ? :