Last active
February 23, 2019 09:45
-
-
Save polac24/b0dc9d5d2489c625ec4fbe71cfa972c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
func testDelegateKeepsWeakReference() { | |
// Arrange | |
let sut = MasterClass() | |
// Act | |
let listener = weaklyScoped(MasterListener()) { | |
sut.add($0) | |
} | |
// Assert | |
XCTAssertNil(listener) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment