Update tests to pass in progress objects
This commit is contained in:
parent
97c31c7548
commit
ebac808683
1 changed files with 4 additions and 2 deletions
|
@ -18,7 +18,8 @@ class DiamondSquareAlgorithmPerformanceTests: XCTestCase {
|
|||
let box = Box(origin: Point(x: 0, y: 0), size: Size(w: 129, h: 129))
|
||||
let alg = DiamondSquareGenerator.Algorithm(grid: box)
|
||||
measure {
|
||||
_ = alg.queue_render()
|
||||
let prog = Progress(totalUnitCount: 1)
|
||||
_ = alg.render(progress: prog)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -122,7 +123,8 @@ class DiamondSquareBoxTests: XCTestCase {
|
|||
Box(origin: Point(x: 3, y: 3), size: Size(w: 2, h: 2)),
|
||||
].reversed()
|
||||
|
||||
box.breadthFirstSearch { (box: Box) -> (Void) in
|
||||
let prog = Progress(totalUnitCount: 1)
|
||||
box.breadthFirstSearch(progress: prog) { (box: Box) -> (Void) in
|
||||
let exBox = expectedBoxes.popLast()
|
||||
XCTAssertNotNil(exBox)
|
||||
XCTAssertEqual(box, exBox!)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue