Condition Coverage

blib/lib/Text/Layout/PDFAPI2.pm
Criterion Covered Total %
condition 53 259 20.4


and 2 conditions

line l !l condition
450 0 0 $all and 0

and 3 conditions

line !l l&&!r l&&r condition
19 0 0 3 @data == 1 and ref($data[0]) =~ /^PDF::(API2|Builder)\b/
123 0 0 0 defined $delta and $self->{'_content'}[$i]{'bgcolor'}
0 0 0 defined $delta and $self->{'_content'}[$i]{'bgcolor'} and $self->{'_content'}[$i]{'bgcolor'} eq $self->{'_content'}[$fx]{'bgcolor'}
180 0 0 1 $fragment->{'type'} eq "text" and length $fragment->{'text'}
236 1 0 0 $font->issymbol and $font->is_standard
262 1 0 0 $fragment->{'underline'} and $fragment->{'underline'} ne "none"
291 1 0 0 $fragment->{'overline'} and $fragment->{'overline'} ne "none"
395 2 0 4 $_->{'type'} eq "text" and length $_->{'text'}
410 2 2 0 $all and $font->can("extents")
488 4 0 0 $self->{'_width'} and $dir
4 0 0 $self->{'_width'} and $dir and $w < $self->{'_width'}
489 0 0 0 $dir eq "rtl" and !$align || $align eq 'left'
494 4 0 0 $self->{'_width'} and $align
4 0 0 $self->{'_width'} and $align and $w < $self->{'_width'}
634 19 0 0 $self->{'-dokern'} and $self->haveKernPairs
641 0 0 19 defined $ex and %$ex
783 1 0 0 $font->{'OS/2'}{'bSerifStyle'} > 10 and $font->{'OS/2'}{'bSerifStyle'} < 14
798 1 0 0 $font->{'post'}->read->{'FormatType'} == 3 and defined $font->{'cmap'}->read->find_ms
926 0 0 0 $1 and lc $d->{'name'}->find_name(1) ne lc $1
927 0 0 0 $2 and lc $d->{'name'}->find_name(2) ne lc $2

or 2 conditions

line l !l condition
86 0 1 $self->{'_alignment'} // 0
124 0 0 $delta //= 0
259 0 1 $font->data->{'upem'} // 1000
370 0 2 $_->{'desc'} // 0
2 0 $_->{'width'} // 0
0 2 $_->{'asc'} // 0
407 0 4 $f->{'direction'} || 'ltr'
450 0 0 $xMin // 0
0 0 $yMin // 0
0 0 $xMax // 0
0 0 $yMax // 0
539 0 0 $2 // ""
574 0 0 $dx //= 0
575 0 0 $dy //= 0
612 1 0 $size //= 1
668 5 0 $_ // 0
669 1 0 $_ // 0
737 1 0 $stretch[$font->{'OS/2'}{'usWidthClass'}] || 'Normal'
758 0 1 $font->{'cmap'}->find_ms->{'Platform'} == 3 && $font->{'cmap'}->read->find_ms->{'Encoding'} == 0 || 0
776 1 0 int $font->{'hhea'}->read->{'advanceWidthMax'} * 1000 / $data->{'upem'} || 1000
835 245 0 $u || 0
846 215 41 $data->{'u2g'}{$_} or 0
848 255 1 $_ or 0
920 0 0 delete $opts{'font'} // ""
971 0 0 $col ||= "magenta"
1019 0 0 $x ||= 0
0 0 $y ||= 0
0 0 $d ||= 50
0 0 $col ||= "blue"
1027 0 0 $col ||= "black"
1028 0 0 $lw ||= "0.5"

or 3 conditions

line l !l&&r !l&&!r condition
24 3 0 0 not $fc or $fc->{'__PDF__'} ne $data[0]
109 0 0 0 $fx == 0 or not $self->{'_content'}[$fx - 1]{'bgcolor'}
114 0 0 0 $fx == $nfx - 1 or not $self->{'_content'}[$fx + 1]{'bgcolor'}
193 1 0 0 $fragment->{'size'} || $self->{'_currentsize'}
197 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
203 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
242 1 0 0 $fragment->{'size'} || $self->{'_currentsize'}
263 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
265 0 0 0 $f->{'underline_position'} || $font->underlineposition
267 0 0 0 $f->{'underline_thickness'} || $font->underlinethickness
268 0 0 0 $fragment->{'underline_color'} // $fragment->{'color'}
279 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
286 0 0 0 $f->{'strikeline_thickness'} || $f->{'underline_thickness'} || $font->underlinethickness
287 0 0 0 $fragment->{'strikethrough_color'} // $fragment->{'color'}
292 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
296 0 0 0 $f->{'overline_thickness'} || $f->{'underline_thickness'} || $font->underlinethickness
300 0 0 0 $fragment->{'overline_color'} // $fragment->{'color'}
323 0 0 0 $fragment->{'size'} || $self->{'_currentsize'}
384 0 0 0 $xMin //= $w + $ab[0]
390 0 0 0 not defined $yMin or $ab[1] < $yMin
391 0 0 0 not defined $yMax or $ab[3] > $yMax
433 0 0 0 $xMin //= $w + $e->{'xMin'}
435 0 0 0 not defined $yMin or $e->{'yMin'} < $yMin
437 0 0 0 not defined $yMax or $e->{'yMax'} > $yMax
458 0 0 0 $xMin //= $w - $e->{'wx'} + $e->{'xMin'}
460 0 0 0 not defined $yMin or $e->{'yMin'} < $yMin
462 0 0 0 not defined $yMax or $e->{'yMax'} > $yMax
480 0 4 0 $dir //= $mydir
489 0 0 0 !$align || $align eq 'left'
520 0 0 0 $fd->{'ascender'} //= $f->ascender
521 0 0 0 $fd->{'descender'} //= $f->descender
525 0 3 0 "Text::Layout::FontConfig"->remap($font) // $font
562 0 3 0 $fd->{'ascender'} //= $ff->ascender
563 0 3 0 $fd->{'descender'} //= $ff->descender
655 18 1 0 $xMin //= $width - $lastwidth + $e->{'xMin'}
656 1 3 15 not defined $yMin or $e->{'yMin'} < $yMin
657 1 0 18 not defined $yMax or $e->{'yMax'} > $yMax
788 0 1 0 $font->{'OS/2'}{'CapHeight'} || int $data->{'fontbbox'}[3] * 0.8
789 0 1 0 $font->{'OS/2'}{'xHeight'} || int $data->{'fontbbox'}[3] * 0.4
826 0 0 0 $cffcmap{$key} // $key
842 0 0 0 $data->{'u2g'}{$_} ||= $font->{'cmap'}->read->ms_lookup($_)
843 0 0 0 $data->{'u2g'}{$_ & 255} ||= $font->{'cmap'}->read->ms_lookup($_)
851 4 251 1 $data->{'u2e'}{$data->{'e2u'}[$n]} //= $n
969 0 0 0 $x //= $self->{'_lastx'}
970 0 0 0 $y //= $self->{'_lasty'}