diff --git a/OSBindings/Mac/Clock SignalTests/C1540Tests.swift b/OSBindings/Mac/Clock SignalTests/C1540Tests.swift index cce738162..5f169902b 100644 --- a/OSBindings/Mac/Clock SignalTests/C1540Tests.swift +++ b/OSBindings/Mac/Clock SignalTests/C1540Tests.swift @@ -10,4 +10,22 @@ import XCTest class C1540Tests: XCTestCase { + private func with1540(action: (C1540Bridge) -> ()) { + let bridge = C1540Bridge() + + if let path = NSBundle.mainBundle().pathForResource("1541", ofType: "bin", inDirectory: "ROMImages/Commodore1540") { + let data = NSData(contentsOfFile: path) + bridge.setROM(data) + } + + action(bridge) + } + + // MARK: EOI + + func testEOI() { + with1540 { + $0.runForCycles(20) + } + } }