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.
EXC_BREAKPOINT using UITableViewCell's textLabel's text in a test target
-
07-12-2021 - |
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.
Solution
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow