1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-07-06 01:28:57 +00:00

Updates to track Swift.

This commit is contained in:
Thomas Harte 2019-03-27 21:25:51 -04:00
parent 7f5c637aeb
commit b0b2798f39
2 changed files with 5 additions and 4 deletions

View File

@ -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

View File

@ -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 {