From b0b2798f398c5f7687dcd7b32356a9cfcca7769b Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Wed, 27 Mar 2019 21:25:51 -0400 Subject: [PATCH] Updates to track Swift. --- OSBindings/Mac/Clock SignalTests/Z80MachineCycleTests.swift | 3 ++- OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift | 6 +++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/OSBindings/Mac/Clock SignalTests/Z80MachineCycleTests.swift b/OSBindings/Mac/Clock SignalTests/Z80MachineCycleTests.swift index 4295e6cf3..e719e977c 100644 --- a/OSBindings/Mac/Clock SignalTests/Z80MachineCycleTests.swift +++ b/OSBindings/Mac/Clock SignalTests/Z80MachineCycleTests.swift @@ -24,6 +24,7 @@ class Z80MachineCycleTests: XCTestCase { case .portRead: opName = "i" case .portWrite: opName = "o" case .internalOperation: opName = "iop" + default: opName = "?" } return "\(opName) \(length)" } @@ -35,7 +36,7 @@ class Z80MachineCycleTests: XCTestCase { // Create a machine and install the supplied program at address 0, setting the PC to run from there let machine = CSTestMachineZ80() machine.setValue(0x0000, for: .programCounter) - machine.setData(Data(bytes: program), atAddress: 0x0000) + machine.setData(Data(_: program), atAddress: 0x0000) // Figure out the total number of cycles implied by the bus cycles var totalCycles: Int32 = 0 diff --git a/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift b/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift index 6fc3c5ce5..7ef2513f4 100644 --- a/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift +++ b/OSBindings/Mac/Clock SignalTests/Z80MemptrTests.swift @@ -14,7 +14,7 @@ class Z80MemptrTests: XCTestCase { private func test(program : [UInt8], length : Int32, initialValue : UInt16) -> UInt16 { // Create a machine and install the supplied program at address 0, setting the PC to run from there machine.setValue(0x0000, for: .programCounter) - machine.setData(Data(bytes: program), atAddress: 0x0000) + machine.setData(Data(_: program), atAddress: 0x0000) // Set the initial value of memptr, run for the requested number of cycles, // return the new value @@ -316,7 +316,7 @@ class Z80MemptrTests: XCTestCase { let program: [UInt8] = [ 0xed, 0xa1 ] - machine.setData(Data(bytes: program), atAddress: 0x0000) + machine.setData(Data(_: program), atAddress: 0x0000) machine.setValue(0, for: .memPtr) for c in 1 ..< 65536 { @@ -332,7 +332,7 @@ class Z80MemptrTests: XCTestCase { let program: [UInt8] = [ 0xed, 0xa9 ] - machine.setData(Data(bytes: program), atAddress: 0x0000) + machine.setData(Data(_: program), atAddress: 0x0000) machine.setValue(0, for: .memPtr) for c in 1 ..< 65536 {