Added more tests

This commit is contained in:
Claus Höfele
2014-03-14 23:15:16 +01:00
parent 90069e4761
commit f9ffcf4d2c

View File

@@ -129,4 +129,16 @@
XCTAssertEqual(blockCalled, 1);
}
- (void)testEnumerateLinkRangesContainingPointOverlapping
{
[self.linkTextView addLinkForRange:NSMakeRange(0, 20)];
[self.linkTextView addLinkForRange:NSMakeRange(5, 20)];
__block NSUInteger blockCalled = 0;
[self.linkTextView enumerateLinkRangesContainingPoint:CGPointMake(50, 20) usingBlock:^(NSRange range) {
blockCalled++;
}];
XCTAssertEqual(blockCalled, 2);
}
@end