Branch Coverage

blib/lib/ELF/Writer.pm
Criterion Covered Total %
branch 50 138 36.2


line true false branch
8 0 1 unless eval { do { "\cA\000\000\000\000\000\000\000" } }
39 0 2 if @_
41 0 2 unless $class_to_sym{$v}
60 0 2 if @_
62 0 2 unless $data_to_sym{$v}
92 0 2 if @_
94 0 2 unless $osabi_to_sym{$v}
118 0 5 if @_
120 1 4 unless $type_to_sym{$v}
150 0 1 if @_
152 0 1 unless $machine_to_sym{$v}
167 5 0 $class == 2 ? :
5 5 $class == 1 ? :
179 2 0 unless defined $encoding
185 2 0 $class == 2 ? :
2 2 $class == 1 ? :
198 2 0 unless defined $encoding
204 1 0 $class == 2 ? :
1 1 $class == 1 ? :
216 0 0 unless defined $encoding
225 0 6 unless defined $endian and $endian > 0 and $endian < 3
226 0 6 unless defined $bits and $bits > 0 and $bits < 3
270 0 2 if ($_->type == 6)
271 0 0 if defined $segment_table
293 0 2 if (not defined $_->offset) { }
297 0 2 unless $_->offset >= 0
298 2 0 if defined $_->data and length $_->data
303 0 2 if (@sections)
306 0 0 unless $sections[0]->type == 0
312 0 0 if $_->offset < $prev_end
326 0 0 $prev ? :
0 2 if $_->data_offset < $prev_end
338 0 0 if defined $_->data and length $_->data
345 2 0 if (@segments)
351 2 0 if (not defined $segment_table) { }
352 1 1 $self->class == 2 ? :
362 0 2 if (@sections)
367 0 0 $self->class == 2 ? :
382 2 0 if ($i == @defined_ranges or $prev_end + $insert[0]->size <= $defined_ranges[$i]->data_offset)
391 2 0 $segment_table ? :
0 2 $section_table ? :
403 0 2 unless length $header == $self->elf_header_len
410 0 4 if $pad
427 0 2 unless defined $filesize
432 0 2 unless defined $memsize
436 1 1 $self->_encoding < 2 ? :
466 0 0 unless defined $mode
469 0 0 unless print $fh $self->serialize
470 0 0 unless close $fh
471 0 0 unless chmod $mode, $tmpname
472 0 0 unless rename $tmpname, $filename
492 0 0 unless defined $type
497 0 0 if ($type == 0) { }
0 0 elsif ($type == 8) { }
499 0 0 unless defined $size
500 0 0 unless defined $offset
501 0 0 if $offset or $size
506 0 0 unless defined $size
507 0 0 if $size
513 0 0 if (not defined $size)
514 0 0 unless defined $sec->data
525 0 2 unless defined $type
530 0 2 if ($type == 0) { }
532 0 0 unless defined $filesize
533 0 0 unless defined $offset
534 0 0 if $offset or $filesize
539 2 0 unless (defined $filesize)
540 0 2 unless defined $seg->data
544 2 0 unless defined $seg->memsize