Branch Coverage

blib/lib/PDF/API2/Util.pm
Criterion Covered Total %
branch 47 134 35.0


line true false branch
114 1110 396 if ($n) { }
125 396 1110 if abs $f < "1e-16"
127 918 588 if (abs $f - int($f) < 10 ** (-$mxd)) { }
0 588 elsif ($ad > 0) { }
157 0 0 $n > $_ ? :
163 0 0 $n < $_ ? :
193 0 24 if ($s == 0)
206 5 19 if ($i < 1) { }
4 15 elsif ($i < 2) { }
3 12 elsif ($i < 3) { }
5 7 elsif ($i < 4) { }
3 4 elsif ($i < 5) { }
246 0 0 if ($h < 60) { }
0 0 elsif ($h < 180) { }
0 0 elsif ($h < 240) { }
271 0 0 if ($delta > 1e-09) { }
280 0 0 if ($r == $max) { }
0 0 elsif ($g == $max) { }
290 0 0 if ($h < 0)
305 0 0 if ($delta < 1e-11) { }
309 0 0 if ($l <= 0.5) { }
321 0 0 if ($l <= 0.5) { }
328 0 0 if ($s < 1e-13) { }
344 0 0 if ($ab > 0.45) { }
361 0 23 if (length $name < 5) { }
23 0 elsif (length $name < 8) { }
0 0 elsif (length $name < 11) { }
387 0 2 if (length $name < 6) { }
2 0 elsif (length $name < 10) { }
0 0 elsif (length $name < 14) { }
417 0 24 if (length $name < 5) { }
24 0 elsif (length $name < 8) { }
0 0 elsif (length $name < 11) { }
443 0 0 if (length $name < 5) { }
0 0 elsif (length $name < 8) { }
0 0 elsif (length $name < 11) { }
469 68 0 unless (ref $name)
473 21 47 if ($name =~ /^[a-z]/) { }
23 24 elsif ($name =~ /^#/) { }
0 24 elsif ($name =~ /^%/) { }
24 0 elsif ($name =~ /^!/) { }
0 0 elsif ($name =~ /^&/) { }
489 0 0 unless $name
495 2 0 unless (ref $name)
499 0 2 if ($name =~ /^[a-z]/) { }
0 2 elsif ($name =~ /^#/) { }
2 0 elsif ($name =~ /^%/) { }
0 0 elsif ($name =~ /^!/) { }
0 0 elsif ($name =~ /^&/) { }
515 0 0 unless $name
521 0 0 unless (ref $name)
525 0 0 if ($name =~ /^[a-z]/) { }
0 0 elsif ($name =~ /^\$/) { }
0 0 elsif ($name =~ /^#/) { }
0 0 elsif ($name =~ /^!/) { }
0 0 elsif ($name =~ /^&/) { }
555 0 0 unless $name
566 6 0 if (defined $filter)
569 0 6 unless (ref($filter) =~ /Array$/)
589 3 0 if (defined $filter)
592 0 3 unless (ref($filter) =~ /Array$/)
616 0 13365 if ($e =~ /^uni([0-9A-F]{4})$/)
631 0 0 if defined $PDF::API2::Util::n2u{$name}
645 48 47 if (defined $x2) { }
13 34 elsif (defined $y1) { }
33 1 elsif (defined $PDF::API2::Util::PaperSizes{lc $x1}) { }
0 1 elsif ($x1 =~ /^[\d\.]+$/) { }