mirror of
https://github.com/mre/mos6502.git
synced 2024-11-15 13:05:33 +00:00
Add branch_if_carry_clear_test().
This commit is contained in:
parent
690907f1c4
commit
ecb3f07459
@ -860,6 +860,19 @@ fn jump_test() {
|
||||
assert_eq!(machine.registers.program_counter, addr);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_if_carry_clear_test() {
|
||||
let mut machine = Machine::new();
|
||||
|
||||
machine.execute_instruction((instruction::SEC, instruction::UseImplied));
|
||||
machine.branch_if_carry_clear(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0));
|
||||
|
||||
machine.execute_instruction((instruction::CLC, instruction::UseImplied));
|
||||
machine.branch_if_carry_clear(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0xABCD));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_if_minus_test() {
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user