Add a performance test for the Diamond-Square renderer
This commit is contained in:
parent
f0d6177567
commit
50d895afa1
3 changed files with 65 additions and 0 deletions
|
@ -13,6 +13,16 @@ fileprivate typealias Box = DiamondSquareGenerator.Box
|
|||
fileprivate typealias Point = DiamondSquareGenerator.Point
|
||||
fileprivate typealias Size = DiamondSquareGenerator.Size
|
||||
|
||||
class DiamondSquareAlgorithmPerformanceTests: XCTestCase {
|
||||
func testAlgorithmOn129() {
|
||||
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()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DiamondSquareAlgorithmTests: XCTestCase {
|
||||
fileprivate let grid = Box(origin: Point(x: 0, y: 0), size: Size(w: 5, h: 5))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue