-
-
Save ydzheng/5cc381a733c27dca26bc 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
- (void)testSubviews { | |
WFPinView *v = [[WFPinView alloc] initWithFrame:CGRectMake(0.0f, 0.0f, 320.0f, 568.0f)]; | |
[v layoutSubviews]; | |
CGRect expectedRect = CGRectMake((25.0f, 0.0f, 271.0f, 568.0f)); | |
XCTAssertTrue(CGRectEqualToRect(expectedRect, v.phoneBg.frame), @"Wrong phoneBg frame"); | |
XCTAssertTrue(v.phoneBg.superview == v, @"Wrong superview"); | |
XCTAssertTrue([v.setPinButton isKindOfClass:[UIButton class]], @"Wrong class"); | |
expectedRect = CGRectMake(261.0f, 217.0f, 47.0f, 47.0f); | |
XCTAssertTrue(CGRectEqualToRect (expectedRect, (, v.setPinButton.frame); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment