mirror of
https://github.com/TomHarte/CLK.git
synced 2024-11-26 23:52:26 +00:00
Ensured test raises only the intentional failure exceptions.
This commit is contained in:
parent
838b818cd3
commit
50cd617bd9
@ -38,8 +38,15 @@ class Z80MachineCycleTests: XCTestCase {
|
||||
let length = cycle.timeStamp - totalCycles
|
||||
totalCycles += length
|
||||
|
||||
XCTAssertEqual(length, busCycles[index].length)
|
||||
XCTAssertEqual(cycle.operation, busCycles[index].operation)
|
||||
if index >= busCycles.count {
|
||||
// this can't be reached without one of the asserts failing;
|
||||
// it's to prevent an unintended exeception via out-of-bounds
|
||||
// array access
|
||||
break
|
||||
} else {
|
||||
XCTAssertEqual(length, busCycles[index].length)
|
||||
XCTAssertEqual(cycle.operation, busCycles[index].operation)
|
||||
}
|
||||
|
||||
index += 1
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user