1
0
mirror of https://github.com/mre/mos6502.git synced 2024-11-25 02:33:26 +00:00

separate unit test for decimal sbc should set carry

This commit is contained in:
Sam M W 2021-01-28 10:17:10 +00:00
parent ad40c72dfe
commit b39a67b0a1

View File

@ -809,7 +809,8 @@ mod tests {
#[test]
fn decimal_subtract_test() {
let mut cpu = CPU::new();
cpu.registers.status.or(Status::PS_DECIMAL_MODE);
cpu.registers.status.or(Status::PS_DECIMAL_MODE | Status::PS_CARRY);
cpu.registers.accumulator = 0;
cpu.subtract_with_carry(0x48);
assert_eq!(cpu.registers.accumulator as u8, 0x52);