mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-13 13:33:31 +00:00
Switched back to descriptive failures, but put a cap on them.
This commit is contained in:
parent
fba5af280e
commit
e4e71a1e5f
@ -151,6 +151,7 @@ class FUSETests: XCTestCase {
|
|||||||
XCTAssert(inputArray != nil && outputArray != nil)
|
XCTAssert(inputArray != nil && outputArray != nil)
|
||||||
|
|
||||||
var index = 0
|
var index = 0
|
||||||
|
var failures = 0
|
||||||
for item in inputArray {
|
for item in inputArray {
|
||||||
let itemDictionary = item as! [String: Any]
|
let itemDictionary = item as! [String: Any]
|
||||||
let outputDictionary = outputArray[index] as! [String: Any]
|
let outputDictionary = outputArray[index] as! [String: Any]
|
||||||
@ -179,7 +180,13 @@ class FUSETests: XCTestCase {
|
|||||||
|
|
||||||
let finalState = RegisterState(machine: machine)
|
let finalState = RegisterState(machine: machine)
|
||||||
|
|
||||||
XCTAssert(finalState == targetState, "Failed \(itemDictionary["name"] as! String)")
|
XCTAssertEqual(finalState, targetState, "Failed \(itemDictionary["name"] as! String)")
|
||||||
|
if finalState != targetState {
|
||||||
|
failures = failures + 1
|
||||||
|
if failures == 5 {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// TODO compare bus operations and final memory state
|
// TODO compare bus operations and final memory state
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user