While working on unit tests for DTCoreText I stumbled upon an issue that has two aspects, one for how you set up unit tests and the other is a crash that is new as of Xcode 5.0.1.
Consider this simple unit test:
- (void)testExample
{
UIFont *font = [UIFont fontWithName:@"Helvetica"
size:20];
STAssertNotNil(font, @"font should not be nil");
} |
I consider it esoteric knowledge that you have to have a test host in place if you want to instantiate a UIFont inside a unit test. This is why I am filing it as a bug report, since it “might lead to developer confusion”.
In the least this should be documented somewhere. You will also find a description of a minimalistic workaround for both issues.
Read more
Read more