Branch Coverage

blib/lib/CPU/Emulator/Memory/Banked.pm
Criterion Covered Total %
branch 49 66 74.2


line true false branch
120 6 0 if (not exists $params{'size'} and exists $params{'file'} and not ref $params{'file'} and -s $params{'file'})
132 0 45 unless exists $params{$_}
135 1 14 if $address < 0 or $address + $size - 1 > $self->{'size'} - 1
138 13 1 if ($type eq 'ROM') { }
0 1 elsif ($type eq 'RAM') { }
1 0 elsif ($type eq 'dynamic') { }
140 1 12 unless exists $params{'file'}
144 0 0 exists $params{'file'} ? :
148 0 1 unless exists $params{'function_read'} and exists $params{'function_write'}
151 8 0 if ($bank->{'address'} >= $address and $bank->{'address'} < $address + $size or $address >= $bank->{'address'} and $address < $bank->{'address'} + $bank->{'size'})
169 11 1 length $contents ? :
11 1 exists $params{'file'} ? :
1 11 exists $params{'writethrough'} ? :
1 11 exists $params{'function_read'} ? :
1 11 exists $params{'function_write'} ? :
183 0 10 unless exists $params{'address'}
200 3 35 if $addr < 0 or $addr > $self->{'size'} - 1
202 23 5 if ($bank->{'address'} <= $addr and $bank->{'address'} + $bank->{'size'} > $addr)
206 2 21 if ($bank->{'type'} eq 'dynamic') { }
225 2 11 if $value < 0 or $value > 255
226 2 9 if $addr < 0 or $addr > $self->{'size'} - 1
229 5 2 if ($bank->{'address'} <= $addr and $bank->{'address'} + $bank->{'size'} > $addr)
233 0 5 if ($bank->{'type'} eq 'RAM') { }
2 3 elsif ($bank->{'type'} eq 'ROM' and $bank->{'writethrough'}) { }
1 2 elsif ($bank->{'type'} eq 'ROM') { }
2 0 elsif ($bank->{'type'} eq 'dynamic') { }
236 0 0 if exists $bank->{'file'}
241 2 0 if exists $self->{'file'}
254 1 3 if exists $self->{'file'}
260 9 3 unless (ref $file)
262 3 0 if (&reftype($file) eq 'GLOB') { }
265 3 0 if (eval { do { $file->can('binmode') } }) { }
271 0 3 unless length $contents == $size