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

Contents of /M6502/t/01-orao.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 30 - (show annotations)
Mon Jul 30 17:56:13 2007 UTC (16 years, 10 months ago) by dpavlin
File MIME type: application/x-troff
File size: 621 byte(s)
make screen open
1 #!/usr/bin/perl
2
3 use warnings;
4 use strict;
5
6 use lib './lib';
7
8 use Test::More tests => 6;
9 use Data::Dump qw/dump/;
10
11 BEGIN {
12 use_ok( 'Orao' );
13 }
14
15 ok( my $orao = Orao->new({
16 mmu => sub {},
17 }), 'new' );
18 isa_ok( $orao, 'Orao' );
19
20 my @v = ( 0xff, 0x00, 0xff, 0xaa );
21
22 $orao->poke_code( 0x1000, @v );
23
24 diag dump( $orao->ram( 0x1000, 0x1004 ) );
25
26 is_deeply( [ $orao->ram( 0x1000, 0x1004 ) ], [ @v ], 'ram' );
27 is_deeply( [ $orao->ram( 0x1000, 0x1004 ) ], [ @v ], 'ram doesn\'t mutate' );
28
29 $orao->poke_code( 0x1004, 0x11, 0x22, 0x33, 0x44 );
30
31 like( $orao->hexdump( 0x1000, 0x1004 ), qr/1000 ff 00 ff aa 11 22 33 44/, 'hexdump' );

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26