让XCode报告调用类中的测试用例失败

时间:2013-04-11 21:56:53

标签: xcode sentestingkit

如果我为测试用例编写辅助方法:

- (void)testCallsHelper
{
    [self helper]; // Can I get Xcode to highlight the failure here?
}

- (void)helper
{
    STFail(@"Fail"); // Xcode highlights failure here
}

这会很方便,因为使用Xcode突出显示可以更快地跳转到发生错误的位置,并且将重复的代码放入辅助方法也很方便。

0 个答案:

没有答案