From 50be3a24fe52b16d8b8aba691cc1a8f59f11d3c5 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Sun, 11 Jun 2017 13:30:08 -0400 Subject: [PATCH] Sought to ensure that Mode 1 interrupts aren't happening early. Which they seem not to be. --- OSBindings/Mac/Clock SignalTests/Z80InterruptTests.swift | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/OSBindings/Mac/Clock SignalTests/Z80InterruptTests.swift b/OSBindings/Mac/Clock SignalTests/Z80InterruptTests.swift index 423743a27..ab536791f 100644 --- a/OSBindings/Mac/Clock SignalTests/Z80InterruptTests.swift +++ b/OSBindings/Mac/Clock SignalTests/Z80InterruptTests.swift @@ -135,8 +135,13 @@ class Z80InterruptTests: XCTestCase { machine.runForNumber(ofCycles: 4) XCTAssertEqual(machine.value(for: .programCounter), 0x0102) - // run for eleven more cycles to allow the IRQ to begin - machine.runForNumber(ofCycles: 13) + // run for twelve cycles and confirm that the IRQ has yet to begin + machine.runForNumber(ofCycles: 12) + + XCTAssertNotEqual(machine.value(for: .programCounter), 0x38) + + // run for one more cycles to allow the IRQ to begin + machine.runForNumber(ofCycles: 1) // confirm that the PC is now at 0x38, that the old is on the stack and // that interrupts are now disabled