/[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

Annotation of /M6502/t/01-arch.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 33 - (hide annotations)
Mon Jul 30 21:00:36 2007 UTC (16 years, 10 months ago) by dpavlin
File MIME type: application/x-troff
File size: 621 byte(s)
Orao now calls M6502->init correctly, and other tweak to make it semi-working
1 dpavlin 15 #!/usr/bin/perl
2    
3     use warnings;
4     use strict;
5    
6     use lib './lib';
7    
8 dpavlin 21 use Test::More tests => 6;
9     use Data::Dump qw/dump/;
10 dpavlin 15
11     BEGIN {
12 dpavlin 33 use_ok( 'Arch' );
13 dpavlin 15 }
14    
15 dpavlin 33 ok( my $orao = Arch->new({
16 dpavlin 19 mmu => sub {},
17 dpavlin 15 }), 'new' );
18 dpavlin 33 isa_ok( $orao, 'Arch' );
19 dpavlin 21
20     my @v = ( 0xff, 0x00, 0xff, 0xaa );
21    
22     $orao->poke_code( 0x1000, @v );
23    
24 dpavlin 30 diag dump( $orao->ram( 0x1000, 0x1004 ) );
25    
26 dpavlin 21 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