Branch Coverage

blib/lib/D64/Disk/BAM.pm
Criterion Covered Total %
branch 83 92 90.2


line true false branch
146 74 4 if ($initOK) { }
160 74 4 if ($self->_setup_data($sector_data)) { }
171 8 70 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')
310 0 6 if (defined $directory_first_track)
328 0 0 if (defined $directory_first_sector)
348 0 0 if (defined $directory_first_sector)
367 0 7 if (wantarray) { }
421 18 11 if (defined $disk_name)
427 9 20 if (not defined $disk_name and $convert or defined $disk_name and not $convert)
477 9 2 if (defined $disk_id)
483 4 7 if (not defined $disk_id and $convert or defined $disk_id and not $convert)
533 10 6 if (defined $full_disk_id)
539 12 4 if (not defined $full_disk_id and $convert or defined $full_disk_id and not $convert)
590 4 2 if (defined $dos_type)
596 4 2 if (not defined $dos_type and $convert or defined $dos_type and not $convert)
617 22 19 if ($convert) { }
619 1 21 if (length $text_data > $max_length)
630 4 15 if (length $text_data > $max_length)
635 5 14 if (length $text_data < $max_length)
663 6 213 if (defined $track and $track eq 'all')
667 6 204 if $track == $directory_first_track
672 1 212 unless ($self->_validate_track_number($track))
690 1 4 if ($num_free_sectors >= $max_sector)
702 0 25 if ($num_free_sectors <= 0)
711 2 249 if ($track < 1 or $track > 35) { }
744 2 36 unless ($self->_validate_sector_number($track, $sector))
753 31 5 if (defined $is_used)
756 26 5 if ($is_used) { }
758 1 25 if ($was_sector_used_before) { }
770 1 4 if (not $was_sector_used_before) { }
784 8 28 if ($sector_bam_bitmap & $sector_bam_bitmask) { }
816 8 2 if defined $is_free
820 8 2 if ($is_sector_used) { }
832 1 37 if (not $self->_validate_track_number($track)) { }
838 1 36 if ($sector < 0 or $sector > $max_sector - 1) { }
874 0 0 if ($val >= 32 and $val <= 127) { }
904 2 2 if ($as_petscii) { }
964 2 2 if ($as_petscii) { }