/[VRac]/M6502/t/05-M6502.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /M6502/t/05-M6502.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 88 by dpavlin, Thu Aug 2 11:08:10 2007 UTC revision 89 by dpavlin, Thu Aug 2 12:01:09 2007 UTC
# Line 6  use strict; Line 6  use strict;
6  use blib;  use blib;
7  use lib './lib';  use lib './lib';
8    
9  use Test::More tests => 21;  use Test::More tests => 36;
10  use Test::Exception;  use Test::Exception;
11  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
12    
# Line 40  cmp_ok( $PC, '==', 0xbeef, 'PC' ); Line 40  cmp_ok( $PC, '==', 0xbeef, 'PC' );
40    
41  ok( M6502::reset(), 'reset' );  ok( M6502::reset(), 'reset' );
42    
43  cmp_ok( $PC, '==', 0x4242, 'PC' );  cmp_ok( $PC, '==', 0xffff, 'PC' );
44    
45  diag dump_R();  diag dump_R();
46    
# Line 56  cmp_ok( $PC, '==', 0xdead, 'PC' ); Line 56  cmp_ok( $PC, '==', 0xdead, 'PC' );
56    
57  ok( M6502::reset(), 'reset again' );  ok( M6502::reset(), 'reset again' );
58    
59  cmp_ok( $PC, '==', 0x4242, 'PC' );  cmp_ok( $PC, '==', 0xffff, 'PC' );
60    
61    foreach my $byte ( 0x00, 0x01, 0xff, 0xaa, 0x00 ) {
62            my $a = 0x1000 + $byte * 100;
63            cmp_ok( M6502::_write($a,$byte), '==', $byte, 'M6502::_write' );
64            cmp_ok( $mem[$a], '==', $byte, '$mem' );
65            cmp_ok( M6502::_read($a), '==', $byte, 'M6502::_read' );
66    }

Legend:
Removed from v.88  
changed lines
  Added in v.89

  ViewVC Help
Powered by ViewVC 1.1.26