File tree Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Expand file tree Collapse file tree 1 file changed +9
-20
lines changed Original file line number Diff line number Diff line change @@ -15,26 +15,15 @@ import XCTest
1515
1616class FlexLayoutTests : XCTestCase {
1717
18- override func setUp( ) {
19- super. setUp ( )
20- // Put setup code here. This method is called before the invocation of each test method in the class.
21- }
22-
23- override func tearDown( ) {
24- // Put teardown code here. This method is called after the invocation of each test method in the class.
25- super. tearDown ( )
26- }
27-
28- func testExample( ) {
29- // This is an example of a functional test case.
30- // Use XCTAssert and related functions to verify your tests produce the correct results.
31- }
32-
33- func testPerformanceExample( ) {
34- // This is an example of a performance test case.
35- self . measure {
36- // Put the code you want to measure the time of here.
37- }
18+ func testRetainCycle( ) {
19+ weak var weakView : UIView ? = nil
20+ _ = { _ in
21+ let strongView = UIView ( )
22+ strongView. flex. direction ( . column)
23+ weakView = strongView
24+ } ( )
25+
26+ XCTAssertNil ( weakView, " Creation of flex should not lead to retain cycle " )
3827 }
3928
4029}
You can’t perform that action at this time.
0 commit comments