/[VRac]/M6502/t/01-arch.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/01-arch.t

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

revision 19 by dpavlin, Sun Jul 29 21:56:40 2007 UTC revision 21 by dpavlin, Mon Jul 30 08:54:18 2007 UTC
# Line 5  use strict; Line 5  use strict;
5    
6  use lib './lib';  use lib './lib';
7    
8  use Test::More tests => 3;  use Test::More tests => 6;
9    use Data::Dump qw/dump/;
10    
11  BEGIN {  BEGIN {
12  use_ok( 'Orao' );  use_ok( 'Orao' );
# Line 15  ok( my $orao = Orao->new({ Line 16  ok( my $orao = Orao->new({
16          mmu => sub {},          mmu => sub {},
17  }), 'new' );  }), 'new' );
18  isa_ok( $orao, 'Orao' );  isa_ok( $orao, 'Orao' );
19    
20    my @v = ( 0xff, 0x00, 0xff, 0xaa );
21    
22    $orao->poke_code( 0x1000, @v );
23    
24    is_deeply( [ $orao->ram( 0x1000, 0x1004 ) ], [ @v ], 'ram' );
25    is_deeply( [ $orao->ram( 0x1000, 0x1004 ) ], [ @v ], 'ram doesn\'t mutate' );
26    
27    $orao->poke_code( 0x1004, 0x11, 0x22, 0x33, 0x44 );
28    
29    like( $orao->hexdump( 0x1000, 0x1004 ), qr/1000 ff 00 ff aa 11 22 33 44/, 'hexdump' );

Legend:
Removed from v.19  
changed lines
  Added in v.21

  ViewVC Help
Powered by ViewVC 1.1.26