Skip to content

Commit

Permalink
[Tests] Add oversized font snapshot test (#381)
Browse files Browse the repository at this point in the history
  • Loading branch information
jhersh committed Jun 6, 2015
1 parent 11a4d4a commit 4cd69f3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions Example/TTTAttributedLabelTests/TTTAttributedLabelTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -472,6 +472,16 @@ - (void)testSizeToFitWithTruncationToken {
FBSnapshotVerifyView(label, nil);
}

- (void)testOversizedAttributedFontSize {
CGFloat fontSize = 13.f;

label.font = [UIFont boldSystemFontOfSize:fontSize];
label.text = [[NSAttributedString alloc] initWithString:kTestLabelText
attributes:@{ NSFontAttributeName : [UIFont boldSystemFontOfSize:fontSize + 10] }];
[label setFrame:CGRectMake(0, 0, 150, 60)];
FBSnapshotVerifyView(label, nil);
}

#pragma mark - UIAccessibility

- (void)testAccessibilityElement {
Expand Down

0 comments on commit 4cd69f3

Please sign in to comment.