mirror of
https://github.com/mre/mos6502.git
synced 2025-02-20 09:29:02 +00:00
test branch_across_end_of_address_space
This commit is contained in:
parent
d8a9558095
commit
894e4304ea
10
src/cpu.rs
10
src/cpu.rs
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user