From f7d2e988b6d6ae20c1b1e193d10fbf30c68806df Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Tue, 11 Oct 2016 22:22:53 -0400 Subject: [PATCH] Mildly enhanced unit test, while I'm curious. --- OSBindings/Mac/Clock SignalTests/6502InterruptTests.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/OSBindings/Mac/Clock SignalTests/6502InterruptTests.swift b/OSBindings/Mac/Clock SignalTests/6502InterruptTests.swift index 7fd637992..f07de2fa4 100644 --- a/OSBindings/Mac/Clock SignalTests/6502InterruptTests.swift +++ b/OSBindings/Mac/Clock SignalTests/6502InterruptTests.swift @@ -42,7 +42,9 @@ class MOS6502InterruptTests: XCTestCase { XCTAssert(machine.value(for: .programCounter) == 0x4004, "No interrupt should have occurred from interrupt raised between instructions") // run for a further 7 cycles, confirm that the IRQ vector was jumped to - machine.runForNumber(ofCycles: 7) + machine.runForNumber(ofCycles: 6) + XCTAssert(machine.value(for: .programCounter) != 0x1234, "Interrupt routine should not yet have begun") + machine.runForNumber(ofCycles: 1) XCTAssert(machine.value(for: .programCounter) == 0x1234, "Interrupt routine should just have begun") }