Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import UIKit
- import XCTest
- extension XCTestCase {
- func measure(count: UInt, _ block: () -> Void) {
- measure {
- (0..<count).forEach { _ in
- block()
- }
- }
- }
- }
- class Test: XCTestCase {
- private let count: UInt = 1000
- func testA() {
- measure(count: count) {
- // test code here
- }
- }
- func testB() {
- measure(count: count) {
- // test code here
- }
- }
- }
- Test.defaultTestSuite.run()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement