daily pastebin goal
34%
SHARE
TWEET

Untitled

a guest Feb 22nd, 2019 71 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. func testDelegateKeepsWeakReferenceUsingTeardown() {
  2.     let sut = MasterClass()
  3.     let delegate = MasterDelegate()
  4.     weak var masterDelegate = delegate
  5.     sut.delegate = delegate
  6.    
  7.     addTeardownBlock {
  8.         XCTAssertNil(masterDelegate)
  9.     }
  10. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top