Branch Coverage

blib/lib/CPU/Emulator/Memory.pm
Criterion Covered Total %
branch 30 32 93.7


line true false branch
66 9 4 unless (exists $params{'size'})
67 1 8 if (exists $params{'bytes'}) { }
73 10 3 unless (exists $params{'bytes'})
77 1 12 if length $params{'bytes'} != $params{'size'}
79 3 9 if (exists $params{'file'})
80 1 2 if (-e $params{'file'}) { }
91 3 9 $params{'file'} ? :
121 1 2 if ($self->{'endianness'} eq 'BIG')
128 3 21 if $addr < 0 or $addr > $self->{'size'} - 1
156 1 1 if ($self->{'endianness'} eq 'BIG')
165 2 11 if $value < 0 or $value > 255
166 2 9 if $addr < 0 or $addr > $self->{'size'} - 1
170 3 6 if exists $self->{'file'}
179 0 10 unless open my $fh, $file
183 1 9 unless length $contents == $size
201 0 9 unless open my $fh, '>', $file