mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 07:49:19 +00:00
Add branch_if_overflow_set_test().
This commit is contained in:
parent
5e0d4c68cc
commit
c00e170285
@ -1006,3 +1006,15 @@ fn branch_if_overflow_clear_test() {
|
||||
machine.branch_if_overflow_clear(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0xABCD));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn branch_if_overflow_set_test() {
|
||||
let mut machine = Machine::new();
|
||||
|
||||
machine.branch_if_overflow_set(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0));
|
||||
|
||||
machine.registers.status.insert(PS_OVERFLOW);
|
||||
machine.branch_if_overflow_set(Address(0xABCD));
|
||||
assert_eq!(machine.registers.program_counter, Address(0xABCD));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user