1
0
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:
Sam M W 2022-10-23 07:04:15 +01:00
parent 2bcbfa63b5
commit c2e77b5f52

View File

@ -845,6 +845,11 @@ mod tests {
assert_eq!(cpu.registers.accumulator, -128);
cpu.add_with_carry(-128);
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)]