mirror of
https://github.com/mre/mos6502.git
synced 2025-02-20 09:29:02 +00:00
add failing test
This commit is contained in:
parent
11e48c1691
commit
bf543e2fbe
@ -837,6 +837,15 @@ mod tests {
|
||||
use super::*;
|
||||
use num::range_inclusive;
|
||||
|
||||
#[test]
|
||||
fn dont_panic_for_overflow() {
|
||||
let mut cpu = CPU::new();
|
||||
cpu.add_with_carry(-128);
|
||||
assert_eq!(cpu.registers.accumulator, -128);
|
||||
cpu.add_with_carry(-128);
|
||||
assert_eq!(cpu.registers.accumulator, 0);
|
||||
}
|
||||
|
||||
#[cfg_attr(feature = "decimal_mode", test)]
|
||||
fn decimal_add_test() {
|
||||
let mut cpu = CPU::new();
|
||||
|
Loading…
x
Reference in New Issue
Block a user