Branch Coverage

blib/lib/CPU/Emulator/DCPU16.pm
Criterion Covered Total %
branch 51 86 59.3


line true false branch
93 1 4 unless ref $self
96 0 5 unless @bytes
175 0 5 if $opts{'debug'} >= 1
179 3 732 if $opts{'limit'} > 0 and ++$count > $opts{'limit'}
180 2 733 if $self->pc >= $self->program_top and not $opts{'full_memory'}
197 0 735 if $opts{'debug'} >= 1
201 0 735 unless defined $word
213 734 1 if ($op) { }
1 0 elsif ($a == 1) { }
215 0 734 unless defined $meth
228 0 735 if $opts{'cycle_penalty'} > 0
242 0 3328 if @_
253 0 7 if @_
264 0 1008 if @_
275 0 745 if @_
286 0 735 if @_
297 0 110 unless @_
298 0 110 if $loc < 0 or $loc >= $MAX_REGISTERS
299 0 110 if @_
305 0 794 if $loc < 0 or $loc >= $MAX_REGISTERS
316 0 755 unless @_
318 0 755 if $loc < 0 or $loc >= $MAX_MEMORY
319 0 755 if @_
326 0 464 if $loc < 0 or $loc >= $MAX_MEMORY
355 794 676 if ($value < 8) { }
94 582 elsif ($value < 16) { }
10 572 elsif ($value < 24) { }
1 571 elsif ($value == 24) { }
0 571 elsif ($value == 25) { }
0 571 elsif ($value == 26) { }
0 571 elsif ($value == 27) { }
97 474 elsif ($value == 28) { }
0 474 elsif ($value == 29) { }
4 470 elsif ($value == 30) { }
355 115 elsif ($value == 31) { }
384 1355 115 ref $ret ? :
394 0 4 if ($op & 15) == 0
444 0 0 if ($$b) { }
456 0 0 if ($$b) { }
504 0 0 unless $$a + 0 == $$b + 0
511 4 94 unless $$a + 0 != $$b + 0
518 0 0 unless $$a + 0 > $$b + 0
525 0 0 unless ($$a + 0 & $$b + 0) != 0