Skip to content

Commit

Permalink
Move unit test for better grouping with other truncation token unit t…
Browse files Browse the repository at this point in the history
…est.
  • Loading branch information
dillan committed Oct 26, 2016
1 parent b979605 commit e84c3bc
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions Example/TTTAttributedLabelTests/TTTAttributedLabelTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -202,19 +202,6 @@ - (void)testMultilineLabelSizing {
XCTAssertGreaterThan(size.height, font.pointSize, @"Text should size to more than one line");
}

- (void)testMultilineLabelSizeThatFitsWithTruncationToken {
NSAttributedString *testString = TTTAttributedTestString();
label.text = testString;

NSAttributedString *tokenString = TTTAttributedTruncationTokenString();
label.attributedTruncationToken = tokenString;

CGSize size = [label sizeThatFits:kTestLabelSize];

UIFont *font = [testString attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL];
XCTAssertGreaterThan(size.height, font.pointSize, @"Text should size to more than one line");
}

- (void)testContainsLinkAtPoint {
label.text = TTTAttributedTestString();
[label addLinkToURL:testURL withRange:NSMakeRange(0, 4)];
Expand Down Expand Up @@ -583,6 +570,19 @@ - (void)testSizeToFitWithTruncationToken {
FBSnapshotVerifyView(label, nil);
}

- (void)testMultilineLabelSizeThatFitsWithTruncationToken {
NSAttributedString *testString = TTTAttributedTestString();
label.text = testString;

NSAttributedString *tokenString = TTTAttributedTruncationTokenString();
label.attributedTruncationToken = tokenString;

CGSize size = [label sizeThatFits:kTestLabelSize];

UIFont *font = [testString attribute:NSFontAttributeName atIndex:0 effectiveRange:NULL];
XCTAssertGreaterThan(size.height, font.pointSize, @"Text should size to more than one line");
}

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

Expand Down

0 comments on commit e84c3bc

Please sign in to comment.