1
0
mirror of https://github.com/mre/mos6502.git synced 2024-06-20 00:29:37 +00:00

test branch_across_end_of_address_space

This commit is contained in:
Sam M W 2022-10-18 14:55:22 +01:00
parent d8a9558095
commit 894e4304ea

View File

@ -1228,6 +1228,16 @@ mod tests {
assert_eq!(cpu.registers.program_counter, (0xABCD));
}
#[test]
fn branch_across_end_of_address_space() {
let mut cpu = CPU::new();
cpu.registers.program_counter = 0xffff;
cpu.registers.status.insert(Status::PS_OVERFLOW);
cpu.branch_if_overflow_set(0xABCD);
assert_eq!(cpu.registers.program_counter, (0xABCD));
}
#[test]
fn branch_if_overflow_set_test() {
let mut cpu = CPU::new();