6 |
use blib; |
use blib; |
7 |
use lib './lib'; |
use lib './lib'; |
8 |
|
|
9 |
use Test::More tests => 53; |
use Test::More tests => 54; |
10 |
use Test::Exception; |
use Test::Exception; |
11 |
use Data::Dump qw/dump/; |
use Data::Dump qw/dump/; |
12 |
|
|
83 |
diag dump_R(); |
diag dump_R(); |
84 |
$PC = 0x1000; |
$PC = 0x1000; |
85 |
|
|
86 |
ok( ! M6502::exec( 1 ), 'M6502::exec(1)' ); |
ok( my $left = M6502::exec( 1 ), 'M6502::exec(1)' ); |
87 |
cmp_ok( $PC, '==', 0x1002, 'PC moved' ); |
cmp_ok( $PC, '==', 0x1002, 'PC moved' ); |
88 |
|
cmp_ok( $left, '==', -1, 'no cycles left' ); |
89 |
|
|
90 |
ok( ! M6502::exec( 1000 ), 'M6502::exec' ); |
ok( ! M6502::exec( 1000 ), 'M6502::exec' ); |
91 |
cmp_ok( $PC, '==', 0x1016, 'PC moved' ); |
cmp_ok( $PC, '==', 0x1016, 'PC moved' ); |