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 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 8442 1168 38 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR < $num_items
8442 0 1168 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items
8442 1111 57 $j == 0 and ($i + 1) * $ITEMS_PER_SECTOR >= $num_items and $i * $ITEMS_PER_SECTOR < $num_items
9074 469 10 $i == 0 and $j == 0
9543 0 10 $i == 0 and $j == 0 and $num_items == 0
715 6 11 0 exists $args{'index'} and exists $args{'pattern'}
762 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
782 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
820 4 0 54 ref $item and $item->isa('D64::Disk::Dir::Item')
968 24 10 1 exists $args{'index'} and exists $args{'pattern'}
1013 4 10 11 $count and not $global
1030 24 0 5 $was_closed == $is_closed and $was_deleted == $is_deleted
1070 28 10 1 exists $args{'index'} and exists $args{'pattern'}
1307 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
1317 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
640 5 0 $args{'count'} || 'all'
1270 2 3 $args{'as_petscii'} || 0

or 3 conditions

line l !l&&r !l&&!r condition
169 0 257 0 ref $this || $this
719 11 6 0 exists $args{'index'} or exists $args{'pattern'}
972 10 23 1 exists $args{'index'} or exists $args{'pattern'}
1074 10 27 1 exists $args{'index'} or exists $args{'pattern'}
1269 5 0 0 $args{'fh'} || *STDOUT