@@ -108,27 +108,6 @@ - (void)testReferenceCounting
108
108
XCTAssertTrue (1 == component.retainCount );
109
109
}
110
110
111
- - (void )testLazyCreatView
112
- {
113
- dispatch_async (dispatch_get_global_queue (DISPATCH_QUEUE_PRIORITY_DEFAULT, 0 ), ^{
114
- WXSDKInstance *instance = [[WXSDKInstance alloc ] init ];
115
- WXComponent *component = [[WXComponent alloc ] initWithRef: @" 0" type: @" div" styles: @{} attributes: @{} events: @[] weexInstance: instance];
116
- WXComponent *subcomponent = [[WXComponent alloc ] initWithRef: @" 1" type: @" div" styles: @{} attributes: @{} events: @[] weexInstance: instance];
117
- WXComponent *subSubcomponent = [[WXComponent alloc ] initWithRef: @" 2" type: @" div" styles: @{} attributes: @{} events: @[] weexInstance: instance];
118
- // subcomponent->_lazyCreateView = YES;
119
- [component _insertSubcomponent: subcomponent atIndex: 0 ];
120
- [subcomponent _insertSubcomponent: subSubcomponent atIndex: 0 ];
121
- dispatch_async (dispatch_get_main_queue (), ^{
122
- __unused UIView *view = component.view ;
123
- XCTAssertFalse ([subcomponent isViewLoaded ], @" Component which has lazyCreateView should create view when used" );
124
- XCTAssertFalse ([subSubcomponent isViewLoaded ], @" Component which has lazyCreateView should create view when used" );
125
- __unused UIView *subView = subcomponent.view ;
126
- XCTAssertTrue ([subSubcomponent isViewLoaded ], @" Component's lazyCreateView can not create subview." );
127
- XCTAssertEqual (subSubcomponent.view .superview , subcomponent.view , @" Component's lazyCreateView can not add subcomponent's view to subview" );
128
- });
129
- });
130
- }
131
-
132
111
#define XCTAssertEqualCGFloat (expression1, expression2, ...) \
133
112
XCTAssertEqualWithAccuracy (expression1, expression2, 0.00001 )
134
113
0 commit comments