mirror of
https://github.com/mre/mos6502.git
synced 2024-11-28 07:49:19 +00:00
also test subtractions
This commit is contained in:
parent
2bcbfa63b5
commit
c2e77b5f52
@ -845,6 +845,11 @@ mod tests {
|
|||||||
assert_eq!(cpu.registers.accumulator, -128);
|
assert_eq!(cpu.registers.accumulator, -128);
|
||||||
cpu.add_with_carry(-128);
|
cpu.add_with_carry(-128);
|
||||||
assert_eq!(cpu.registers.accumulator, 0);
|
assert_eq!(cpu.registers.accumulator, 0);
|
||||||
|
|
||||||
|
cpu.subtract_with_carry(-128);
|
||||||
|
assert_eq!(cpu.registers.accumulator, -128);
|
||||||
|
cpu.subtract_with_carry(-128);
|
||||||
|
assert_eq!(cpu.registers.accumulator, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg_attr(feature = "decimal_mode", test)]
|
#[cfg_attr(feature = "decimal_mode", test)]
|
||||||
|
Loading…
Reference in New Issue
Block a user