Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Foundation
- import XCTest
- class DemoTests: XCTestCase {
- func test() {
- self.continueAfterFailure = false
- DispatchQueue.main.async() {
- XCTFail("Boom!")
- }
- let ex = self.expectation(description: "Dummy")
- let r = XCTWaiter.wait(for: [ex], timeout: 2)
- if r != .completed {
- XCTFail("Should not get even here")
- }
- XCTFail("And here for sure!")
- XCTFail("And definitely should not get here!")
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement