CPU-Z80-Disassembler

 view release on metacpan or  search on metacpan

t/Instruction.t  view on Meta::CPAN

my $mem;
my $instr;

#------------------------------------------------------------------------------
# test one instruction
sub t_instr (@) {
	my($factory, $addr, $limit, $size, $opcode, $args, 
	   $is_call, $is_branch, $is_break_flow,
	   $string, $dump) = @_;
	
	my $caller_line = (caller)[2];
	ok 1, "[line $caller_line]";

	isa_ok $instr = CPU::Z80::Disassembler::Instruction->$factory(
												$mem, $addr, $limit), 
			'CPU::Z80::Disassembler::Instruction';

	is $instr->memory, 	$mem, 		"memory";
	is $instr->addr, 	$addr, 		"addr = $addr";
	is $instr->size, 	$size, 		"size = $size";
	is $instr->opcode, 	$opcode, 	"opcode = $opcode";



( run in 1.566 second using v1.01-cache-2.11-cpan-1e74a51a04c )