Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
删除test中调用未公开方法
Browse files Browse the repository at this point in the history
  • Loading branch information
Txink committed Aug 29, 2019
1 parent 648e0f5 commit 6a45fd5
Showing 1 changed file with 0 additions and 21 deletions.
21 changes: 0 additions & 21 deletions ios/sdk/WeexSDKTests/WXComponentTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -108,27 +108,6 @@ - (void)testReferenceCounting
XCTAssertTrue(1 == component.retainCount);
}

- (void)testLazyCreatView
{
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
WXSDKInstance *instance = [[WXSDKInstance alloc] init];
WXComponent *component = [[WXComponent alloc] initWithRef:@"0" type:@"div" styles:@{} attributes:@{} events:@[] weexInstance:instance];
WXComponent *subcomponent = [[WXComponent alloc] initWithRef:@"1" type:@"div" styles:@{} attributes:@{} events:@[] weexInstance:instance];
WXComponent *subSubcomponent = [[WXComponent alloc] initWithRef:@"2" type:@"div" styles:@{} attributes:@{} events:@[] weexInstance:instance];
// subcomponent->_lazyCreateView = YES;
[component _insertSubcomponent:subcomponent atIndex:0];
[subcomponent _insertSubcomponent:subSubcomponent atIndex:0];
dispatch_async(dispatch_get_main_queue(), ^{
__unused UIView *view = component.view;
XCTAssertFalse([subcomponent isViewLoaded], @"Component which has lazyCreateView should create view when used");
XCTAssertFalse([subSubcomponent isViewLoaded], @"Component which has lazyCreateView should create view when used");
__unused UIView *subView = subcomponent.view;
XCTAssertTrue([subSubcomponent isViewLoaded], @"Component's lazyCreateView can not create subview.");
XCTAssertEqual(subSubcomponent.view.superview, subcomponent.view, @"Component's lazyCreateView can not add subcomponent's view to subview");
});
});
}

#define XCTAssertEqualCGFloat(expression1, expression2, ...) \
XCTAssertEqualWithAccuracy(expression1, expression2, 0.00001)

Expand Down

0 comments on commit 6a45fd5

Please sign in to comment.