Branch Coverage

blib/lib/Spreadsheet/WriteExcelXML/Format.pm
Criterion Covered Total %
branch 179 208 86.0


line true false branch
101 21 216 if @_
118 0 0 unless defined $other
119 0 0 unless ref $self eq ref $other
142 34 89 unless $index
173 32 21 $$self{'_text_h_align'} != 0 || $$self{'_text_v_align'} != -1 || $$self{'_indent'} != 0 || $$self{'_rotation'} != 0 || $$self{'_text_vertical'} != 0 || $$self{'_text_wrap'} != 0 || $$self{'_shrink'} != 0 || $$self{'_reading_order'} != 0 ? :
184 21 32 unless $changed
187 25 7 if $$self{'_text_v_align'} == -1
191 3 29 if $$self{'_text_vertical'}
192 2 30 if $$self{'_text_wrap'}
193 2 30 if $$self{'_text_h_align'} == 4
194 2 30 if $$self{'_text_h_align'} == 5
195 3 29 if $$self{'_text_h_align'} == 7
196 29 3 if $$self{'_text_h_align'} != 7
199 2 30 if $$self{'_text_h_align'} == 1
200 2 30 if $$self{'_text_h_align'} == 2
201 2 30 if $$self{'_text_h_align'} == 3
202 2 30 if $$self{'_text_h_align'} == 4
203 2 30 if $$self{'_text_h_align'} == 5
204 2 30 if $$self{'_text_h_align'} == 6
206 3 29 if $$self{'_text_h_align'} == 7
208 1 31 if $$self{'_text_v_align'} == 0
209 3 29 if $$self{'_text_v_align'} == 1
210 26 6 if $$self{'_text_v_align'} == 2
211 1 31 if $$self{'_text_v_align'} == 3
212 1 31 if $$self{'_text_v_align'} == 4
214 3 29 if $$self{'_indent'}
215 4 28 if $$self{'_rotation'}
217 3 29 if $$self{'_text_vertical'}
218 2 30 if $$self{'_text_wrap'}
219 1 31 if $$self{'_shrink'}
222 1 31 if $$self{'_reading_order'} == 1
223 1 31 if $$self{'_reading_order'} == 2
269 33 159 if (exists $linetypes{$$self{$position}})
273 5 28 if (my $color = $$self{$position_color})
285 7 41 if (my $diag_type = $$self{'_diag_type'})
288 1 6 unless $$self{'_diag_border'}
293 3 4 if (my $color = $$self{'_diag_color'})
298 5 2 if ($diag_type == 1 or $diag_type == 3)
302 4 3 if ($diag_type == 2 or $diag_type == 3)
326 4 67 if $$self{'_font'} ne 'Arial'
327 5 66 if $$self{'_size'} != 10
328 37 34 if $$self{'_color'}
329 13 58 if $$self{'_bold'}
330 6 65 if $$self{'_italic'}
332 1 70 if $$self{'_font_strikeout'}
333 1 70 if $$self{'_font_outline'}
334 1 70 if $$self{'_font_shadow'}
336 1 70 if $$self{'_font_script'} == 1
337 1 70 if $$self{'_font_script'} == 2
339 4 67 if $$self{'_underline'} == 1
340 1 70 if $$self{'_underline'} == 2
341 1 70 if $$self{'_underline'} == 33
342 0 71 if $$self{'_underline'} == 34
344 1 70 if $$self{'_font_family'}
345 1 70 if $$self{'_font_charset'}
365 23 21 if $$self{'_fg_color'} == 0 and $$self{'_bg_color'} == 0 and $$self{'_pattern'} <= 1
382 6 20 if ($$self{'_pattern'} <= 1)
383 3 3 if ($$self{'_bg_color'}) { }
399 19 1 if $$self{'_bg_color'} == 0
400 19 1 if $$self{'_fg_color'} == 0
423 1 19 unless exists $patterns{$$self{'_pattern'}}
444 20 58 unless defined $$self{'_num_format'}
492 35 23 if (exists $num_format{$$self{'_num_format'}}) { }
515 2 24 if $$self{'_hidden'}
516 2 24 unless $$self{'_locked'}
567 0 57 unless defined $_[0]
570 42 15 if exists $colors{lc $_[0]}
573 0 15 if $_[0] =~ /\D/
576 0 15 if $_[0] < 8
579 0 15 if $_[0] > 63
597 0 21 unless defined $location
598 0 21 if $location =~ /\d/
602 2 19 if $location eq 'left'
603 0 21 if $location eq 'centre'
604 2 19 if $location eq 'center'
605 2 19 if $location eq 'right'
606 2 19 if $location eq 'fill'
607 2 19 if $location eq 'justify'
608 1 20 if $location eq 'center_across'
609 0 21 if $location eq 'centre_across'
610 0 21 if $location eq 'merge'
611 3 18 if $location eq 'distributed'
612 0 21 if $location eq 'equal_space'
615 1 20 if $location eq 'top'
616 0 21 if $location eq 'vcentre'
617 3 18 if $location eq 'vcenter'
618 1 20 if $location eq 'bottom'
619 1 20 if $location eq 'vjustify'
620 1 20 if $location eq 'vdistributed'
621 0 21 if $location eq 'vequal_space'
682 0 13 unless defined $bold
684 13 0 $bold ? :
736 0 6 unless $rotation =~ /^([+-]?)(?=\d|\.\d)\d*(\.\d*)?([Ee]([+-]?\d+))?$/
741 1 5 if ($rotation == 270) { }
0 5 elsif ($rotation < -90 or $rotation > 90) { }
780 0 257 if $key =~ /\W/
787 257 0 if (defined $value) { }
794 0 257 if $@
810 0 62 if $Spreadsheet::WriteExcelXML::Format::AUTOLOAD =~ /::DESTROY$/
813 0 62 unless $Spreadsheet::WriteExcelXML::Format::AUTOLOAD =~ /.*::set(\w+)/
819 0 62 unless exists $$self{$attribute}
832 12 50 if ($Spreadsheet::WriteExcelXML::Format::AUTOLOAD =~ /.*::set\w+color$/) { }
845 0 50 unless defined $value
851 0 146 unless defined $value