Advertisement
mpokhylets

rdar://38906161

Mar 27th, 2018
373
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Swift 0.51 KB | None | 0 0
  1. import Foundation
  2. import XCTest
  3.  
  4. class DemoTests: XCTestCase {
  5.     func test() {
  6.         self.continueAfterFailure = false
  7.         DispatchQueue.main.async() {
  8.             XCTFail("Boom!")
  9.         }
  10.         let ex = self.expectation(description: "Dummy")
  11.         let r = XCTWaiter.wait(for: [ex], timeout: 2)
  12.         if r != .completed {
  13.             XCTFail("Should not get even here")
  14.         }
  15.        
  16.         XCTFail("And here for sure!")
  17.         XCTFail("And definitely should not get here!")
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement