Condition Coverage

blib/lib/D64/Disk/Layout/Dir.pm
Criterion Covered Total %
condition 85 106 80.1


and 2 conditions

line l !l condition
210 39 1 0 do { ref $data ne 'ARRAY' } && do { die sprintf('Unable to initialize disk directory: Invalid arguments given (expected %d bytes)', $expected_data_size) }

and 3 conditions

line !l l&&!r l&&r condition
280 0 8562 1 $test_sector->track == $track and $test_sector->sector == $sector
294 0 0 1061 defined $track and defined $sector
297 0 8431 1061 $sector_object->track == $track and $sector_object->sector == $sector
387 17892 2535 21 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR < $num_items
17892 0 2535 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR >= $num_items
17892 2417 118 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR >= $num_items and $i < $num_items
20285 0 24 $i == 0 and $num_items == 0
444 0 15022 28 $track_order[$j] == $track and $sector_order[$j] == $sector
579 55 0 935 defined $track and defined $sector
595 8316 1150 38 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR < $num_items
8316 0 1150 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items
8316 1093 57 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items and $i * $ITEMS_PER_SECTOR < $num_items
712 6 11 0 exists $args{'index'} and exists $args{'pattern'}
759 14 5 44 'D64::Disk::Dir::Item'->is_int($index) and $index >= 0
19 5 39 'D64::Disk::Dir::Item'->is_int($index) and $index >= 0 and $index <= $maximum_allowed_position
779 2 2 52 defined $pattern and not ref $pattern
4 2 50 defined $pattern and not ref $pattern and is_valid_petscii_string($pattern)
4 2 48 defined $pattern and not ref $pattern and is_valid_petscii_string($pattern) and length $pattern > 0
4 2 46 defined $pattern and not ref $pattern and is_valid_petscii_string($pattern) and length $pattern > 0 and length $pattern <= 16
817 4 0 54 ref $item and $item->isa('D64::Disk::Dir::Item')
965 24 10 1 exists $args{'index'} and exists $args{'pattern'}
1010 4 10 11 $count and not $global
1027 24 0 5 $was_closed == $is_closed and $was_deleted == $is_deleted
1067 28 10 1 exists $args{'index'} and exists $args{'pattern'}
1304 2 0 198168 length $byte_value == 1 and ord $byte_value >= 0
2 0 198168 length $byte_value == 1 and ord $byte_value >= 0 and ord $byte_value <= 255
1314 45 10 6 'D64::Disk::Dir::Item'->is_int($number_value) and $number_value >= 0
55 1 5 'D64::Disk::Dir::Item'->is_int($number_value) and $number_value >= 0 and $number_value <= 255

or 2 conditions

line l !l condition
637 5 0 $args{'count'} || 'all'
1267 2 3 $args{'as_petscii'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
169 0 256 0 ref $this || $this
716 11 6 0 exists $args{'index'} or exists $args{'pattern'}
969 10 23 1 exists $args{'index'} or exists $args{'pattern'}
1071 10 27 1 exists $args{'index'} or exists $args{'pattern'}
1266 5 0 0 $args{'fh'} || *STDOUT