Branch Coverage

blib/lib/D64/Disk/BAM.pm
Criterion Covered Total %
branch 84 92 91.3


line true false branch
146 75 4 if ($initOK) { }
160 75 4 if ($self->_setup_data($sector_data)) { }
171 8 71 if ($sector_data)
172 4 4 unless $self->_validate_bam_data($sector_data)
185 1 7 if (length $sector_data != 256)
194 2 193 if ($num_free_sectors > $track_num_sectors)
205 1 192 if ($free_sectors_count != $num_free_sectors)
211 1 3 if ($directory_first_track != 18)
215 1 3 if ($directory_first_sector != 1)
219 1 3 if ($section_filled_with_A0 ne '0a0a')
223 1 3 if ($section_filled_with_A0 ne '0a0a0a0a')
317 0 7 if (defined $directory_first_track)
335 0 1 if (defined $directory_first_sector)
355 0 0 if (defined $directory_first_sector)
374 0 8 if (wantarray) { }
428 19 11 if (defined $disk_name)
434 9 21 if (not defined $disk_name and $convert or defined $disk_name and not $convert)
484 10 2 if (defined $disk_id)
490 4 8 if (not defined $disk_id and $convert or defined $disk_id and not $convert)
540 10 6 if (defined $full_disk_id)
546 12 4 if (not defined $full_disk_id and $convert or defined $full_disk_id and not $convert)
597 4 2 if (defined $dos_type)
603 4 2 if (not defined $dos_type and $convert or defined $dos_type and not $convert)
624 24 19 if ($convert) { }
626 1 23 if (length $text_data > $max_length)
637 4 15 if (length $text_data > $max_length)
642 5 14 if (length $text_data < $max_length)
670 6 213 if (defined $track and $track eq 'all')
674 6 204 if $track == $directory_first_track
679 1 212 unless ($self->_validate_track_number($track))
697 1 4 if ($num_free_sectors >= $max_sector)
709 0 27 if ($num_free_sectors <= 0)
718 2 251 if ($track < 1 or $track > 35) { }
751 2 38 unless ($self->_validate_sector_number($track, $sector))
760 33 5 if (defined $is_used)
763 28 5 if ($is_used) { }
765 1 27 if ($was_sector_used_before) { }
777 4 1 if ($was_sector_used_before) { }
791 8 30 if ($sector_bam_bitmap & $sector_bam_bitmask) { }
823 8 2 if defined $is_free
827 8 2 if ($is_sector_used) { }
839 39 1 if ($self->_validate_track_number($track)) { }
845 1 38 if ($sector < 0 or $sector > $max_sector - 1) { }
881 0 0 if ($val >= 32 and $val <= 127) { }
911 2 2 if ($as_petscii) { }
971 2 2 if ($as_petscii) { }