Initial commit
[app-scheme79asm.git] / t / App-Scheme79asm.t
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 use Test::More tests => 2;
6 BEGIN { use_ok('App::Scheme79asm') };
7
8 sub run_test {
9 my ($args, $input, $expected, $name) = @_;
10 my $actual = '';
11 open my $fh, '>', \$actual;
12 my $asm = App::Scheme79asm->new(%$args);
13 $asm->parse_and_print($input, $fh);
14 close $fh;
15 is $actual, $expected, $name
16 }
17
18 run_test {addr_bits => 5}, '(quoted . (symbol . 5))', <<'', '(QUOTE 5)';
19 mem[0] <= 0;
20 mem[1] <= 0;
21 mem[2] <= 8'b00100000;
22 mem[3] <= 8'b00100000;
23 mem[4] <= 8'd8;
24 mem[5] <= 8'b11100111;
25 mem[6] <= 0;
26 mem[7] <= 8'b00100101;
This page took 0.02449 seconds and 4 git commands to generate.