mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-13 07:30:21 +00:00
Adjusted for where FUSE nominally places timestamps. Down to 92 failures.
This commit is contained in:
parent
d290e3d99e
commit
267b2add9a
@ -167,7 +167,7 @@ class FUSETests: XCTestCase {
|
|||||||
|
|
||||||
let name = itemDictionary["name"] as! String
|
let name = itemDictionary["name"] as! String
|
||||||
|
|
||||||
// if name != "66" {
|
// if name != "d3_1" {
|
||||||
// continue;
|
// continue;
|
||||||
// }
|
// }
|
||||||
|
|
||||||
@ -230,7 +230,11 @@ class FUSETests: XCTestCase {
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// FUSE counts a memory access as occurring at the last cycle of its bus operation;
|
||||||
|
// it counts a port access as occurring on the second. timeOffset is used to adjust
|
||||||
|
// the FUSE numbers as required.
|
||||||
var operation: CSTestMachineZ80BusOperationCaptureOperation = .read
|
var operation: CSTestMachineZ80BusOperationCaptureOperation = .read
|
||||||
|
var timeOffset: Int32 = 0
|
||||||
switch type {
|
switch type {
|
||||||
case "MR":
|
case "MR":
|
||||||
operation = .read
|
operation = .read
|
||||||
@ -240,9 +244,11 @@ class FUSETests: XCTestCase {
|
|||||||
|
|
||||||
case "PR":
|
case "PR":
|
||||||
operation = .portRead
|
operation = .portRead
|
||||||
|
timeOffset = 3
|
||||||
|
|
||||||
case "PW":
|
case "PW":
|
||||||
operation = .portWrite
|
operation = .portWrite
|
||||||
|
timeOffset = 3
|
||||||
|
|
||||||
default:
|
default:
|
||||||
print("Unhandled activity type \(type)!")
|
print("Unhandled activity type \(type)!")
|
||||||
@ -251,7 +257,7 @@ class FUSETests: XCTestCase {
|
|||||||
XCTAssert(
|
XCTAssert(
|
||||||
capturedBusActivity[capturedBusAcivityIndex].address == address &&
|
capturedBusActivity[capturedBusAcivityIndex].address == address &&
|
||||||
capturedBusActivity[capturedBusAcivityIndex].value == value! &&
|
capturedBusActivity[capturedBusAcivityIndex].value == value! &&
|
||||||
capturedBusActivity[capturedBusAcivityIndex].timeStamp == time &&
|
capturedBusActivity[capturedBusAcivityIndex].timeStamp == (time + timeOffset) &&
|
||||||
capturedBusActivity[capturedBusAcivityIndex].operation == operation,
|
capturedBusActivity[capturedBusAcivityIndex].operation == operation,
|
||||||
"Failed bus operation match \(name) (at time \(time) with address \(address), value was \(value != nil ? value! : 0), tracking index \(capturedBusAcivityIndex) amgonst \(capturedBusActivity))")
|
"Failed bus operation match \(name) (at time \(time) with address \(address), value was \(value != nil ? value! : 0), tracking index \(capturedBusAcivityIndex) amgonst \(capturedBusActivity))")
|
||||||
capturedBusAcivityIndex += 1
|
capturedBusAcivityIndex += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user