Branch Coverage

blib/lib/Language/Zcode/Parser/Opcode.pm
Criterion Covered Total %
branch 94 106 88.6


line true false branch
49 0 134 if $nl > 15
52 0 134 if ($Language::Zcode::Util::Constants{'version'} <= 4)
291 834 2125 if (($opcode & 128) == 0) { }
1077 1048 elsif ($opcode & 64) { }
16 1032 elsif ($opcode == 190 and $z_version >= 5) { }
296 252 582 $opcode & 64 ? :
206 628 $opcode & 32 ? :
304 827 250 $opcode & 32 ? :
315 546 486 if (($opcode & 48) == 48) { }
326 0 2959 unless my $syntax = $generic_opcodes[$op_style][$opcode]
329 864 2095 if (ref $syntax eq 'HASH')
334 58 138 if ($range =~ /^(\d+)$/ and $v == $1 or $range =~ /^(\d+)-$/ and $v >= $1 or $range =~ /^(\d+)-(\d+)$/ and $v >= $1 and $v <= $2 or $range =~ /:/ and $range =~ /\b$v\b/)
344 0 864 unless ($syntax)
353 1093 1866 if ($is_var_ops)
356 16 1077 if ($op_style == 3 and $command =~ /^call_v[sn]2$/) { }
373 2921 733 if (defined(my $op = &load_operand($optype))) { }
387 245 5107 if $key eq '->'
391 466 4641 if ($key eq '?(label)') { }
245 4396 elsif ($key eq '(result)') { }
366 4030 elsif ($key eq '(literal_string)') { }
396 126 340 if ($command eq 'jump') { }
399 0 126 if ($offset =~ /\D/)
402 14 112 if $offset & 32768
408 96 244 unless ($arg & 64)
411 6 90 if $offset & 8192
415 8 458 if ($offset == 1 or $offset == 0) { }
445 411 3985 unless @operands
448 724 3261 if ($key =~ /arg[s1]/) { }
749 2512 elsif ($key eq 'routine') { }
812 1700 elsif ($key eq '(variable)') { }
464 749 2210 if ($command =~ /^call/) { }
2 2208 elsif ($command eq 'save') { }
486 942 4866 if ($op_type == 2) { }
2662 2204 elsif ($op_type == 1) { }
1471 733 elsif ($op_type == 0) { }
733 0 elsif ($op_type == 3) { }
513 66 1933 if ($num =~ /^(sp|local\d+|g[a-f\d]{2})$/) { }
160 1773 elsif ($num == 0) { }
1440 333 elsif ($num >= 1 and $num <= 15) { }
333 0 elsif ($num >= 16 and $num <= 255) { }
552 0 1376 if $PC >= $flen
558 152 3976 if ($two_bit_flag > 0) { }
0 3976 elsif ($abbreviation) { }
1310 2666 elsif ($zchar < 6) { }
560 76 76 if ($two_bit_flag++ == 1) { }
583 422 888 if ($zchar == 0) { }
106 782 elsif ($zchar == 4) { }
782 0 elsif ($zchar == 5) { }
0 0 elsif ($zchar >= 1 and $zchar <= 3) { }
599 2228 438 if ($alphabet != 2) { }
603 76 362 if ($zchar == 0) { }
118 244 elsif ($zchar == 1) { }
618 366 1010 if $word & 32768