add failing test

This commit is contained in:
Sam M W 2022-10-23 06:52:27 +01:00
parent 11e48c1691
commit bf543e2fbe
1 changed files with 9 additions and 0 deletions

View File

@ -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();