die "addr_bits + type_bits >= 16\n"if $self->{addr_bits} + $self->{type_bits} > 16;
my $length = @{$self->{memory}};
- print $fh pack 'n', $length or croak "Failed to print memory size: $!";
+ print $fh pack 'n', $length or croak "Failed to print memory size: $!"; # uncoverable branch true
for (@{$self->{memory}}) {
- print $fh pack 'n', $_ or croak "Failed to print memory: $!"
+ print $fh pack 'n', $_ or croak "Failed to print memory: $!" # uncoverable branch true
}
}
my $string = "mem[$index] <= $val;";
$string .= "$spaces // $comment" if defined $comment;
- say $fh $string or croak "Failed to print verilog: $!";
+ say $fh $string or croak "Failed to print verilog: $!"; # uncoverable branch true
}
}
use warnings;
use Data::Dump::Sexp;
-use Test::More tests => 31;
+use Test::More tests => 32;
BEGIN { use_ok('App::Scheme79asm::Compiler') };
}
is_sexp new->process_quoted(to_sexp '5'), '(SYMBOL 3)', 'process_quoted 5';
+is_sexp new->process_quoted(to_sexp 'NIL'), '(LIST 0)', 'process_quoted NIL';
is_sexp new->process_quoted(to_sexp '()'), '(LIST 0)', 'process_quoted ()';
is_sexp new->process_quoted(to_sexp '(5 foo)'), '(LIST (LIST (LIST 0) (SYMBOL 3)) (SYMBOL 4))', 'process_quoted (5 foo)';
is_sexp new->process_quoted(to_sexp '(((5)))'), '(LIST (LIST 0) (LIST (LIST 0) (LIST (LIST 0) (SYMBOL 3))))', 'process_quoted (((5)))';