mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 07:49:19 +00:00
formatting
This commit is contained in:
parent
5290a9d61e
commit
d8a9558095
@ -775,13 +775,19 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn zeropage_wrap_around() {
|
fn zeropage_wrap_around() {
|
||||||
use crate::instruction::AddressingMode;
|
use crate::instruction::AddressingMode;
|
||||||
use crate::instruction::CPU;
|
|
||||||
use crate::instruction::OpInput;
|
use crate::instruction::OpInput;
|
||||||
|
use crate::instruction::CPU;
|
||||||
|
|
||||||
let mut cpu = CPU::new();
|
let mut cpu = CPU::new();
|
||||||
cpu.registers.index_x = 9;
|
cpu.registers.index_x = 9;
|
||||||
|
|
||||||
assert!(matches!(AddressingMode::ZeroPageX.process(&cpu, &[10]), OpInput::UseAddress(19)));
|
assert!(matches!(
|
||||||
assert!(matches!(AddressingMode::ZeroPageX.process(&cpu, &[250]), OpInput::UseAddress(3)));
|
AddressingMode::ZeroPageX.process(&cpu, &[10]),
|
||||||
|
OpInput::UseAddress(19)
|
||||||
|
));
|
||||||
|
assert!(matches!(
|
||||||
|
AddressingMode::ZeroPageX.process(&cpu, &[250]),
|
||||||
|
OpInput::UseAddress(3)
|
||||||
|
));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user