Question

I have a test target where I am testing a table view data source.I want to test that the cell's textLabel returned by tableView:cellForRowAtIndexPath: contains the text I expect, but when I set the textLabel's text I get a EXC_BREAKPOINT exception...

Does it have anything to do with the fact that not all classes in UIKit are possible to use in a test target(not sure if that's true anyway)?

Am I missing any special setting in the test target?

Would like to remark that my code is within a static library.

Thanks a lot.

Was it helpful?

Solution

I founded the solution here. Basically, you have to add an iPhone Application target with its own unit test target and doing all the UIKit-related testing there.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top