Condition Coverage

blib/lib/D64/Disk/Layout/Dir.pm
Criterion Covered Total %
condition 90 112 80.3


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 8715 1 $test_sector->track == $track and $test_sector->sector == $sector
294 0 0 1080 defined $track and defined $sector
297 0 8584 1080 $sector_object->track == $track and $sector_object->sector == $sector
387 18144 2571 21 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR < $num_items
18144 0 2571 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR >= $num_items
18144 2453 118 $i % $ITEMS_PER_SECTOR == 0 and $i + $ITEMS_PER_SECTOR >= $num_items and $i < $num_items
20571 0 26 $i == 0 and $num_items == 0
447 0 15328 28 $track_order[$j] == $track and $sector_order[$j] == $sector
582 56 0 952 defined $track and defined $sector
598 8568 1186 38 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR < $num_items
8568 0 1186 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items
8568 1129 57 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items and $i * $ITEMS_PER_SECTOR < $num_items
9210 476 11 $i == 0 and $j == 0
9686 0 11 $i == 0 and $j == 0 and $num_items == 0
721 6 11 0 exists $args{'index'} and exists $args{'pattern'}
768 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
788 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
826 4 0 54 ref $item and $item->isa('D64::Disk::Dir::Item')
974 24 10 1 exists $args{'index'} and exists $args{'pattern'}
1019 4 10 11 $count and not $global
1036 24 0 5 $was_closed == $is_closed and $was_deleted == $is_deleted
1076 28 10 1 exists $args{'index'} and exists $args{'pattern'}
1313 2 0 202776 length $byte_value == 1 and ord $byte_value >= 0
2 0 202776 length $byte_value == 1 and ord $byte_value >= 0 and ord $byte_value <= 255
1323 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
646 5 0 $args{'count'} || 'all'
1276 2 3 $args{'as_petscii'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
169 0 258 0 ref $this || $this
725 11 6 0 exists $args{'index'} or exists $args{'pattern'}
978 10 23 1 exists $args{'index'} or exists $args{'pattern'}
1080 10 27 1 exists $args{'index'} or exists $args{'pattern'}
1275 5 0 0 $args{'fh'} || *STDOUT